Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable warmers by default, and enable them only for specific lambdas? #343

Closed
arielbeckjit opened this issue Oct 3, 2023 · 2 comments
Labels

Comments

@arielbeckjit
Copy link

arielbeckjit commented Oct 3, 2023

this is my warmup configurations:

custom:
  warmup:
    workWeek:
      enabled: true
      events:
        - schedule: cron(*/10 5-19 ? * SUN-FRI *)
      concurrency: 3
      prewarm: false
      cleanFolder: false
      role: IamRoleLambdaExecution
    weekEnd:
      enabled: true
      events:
        - schedule: cron(*/30 5-13 ? * SAT *)
      concurrency: 1
      prewarm: false
      cleanFolder: false
      role: IamRoleLambdaExecution

the problem is, that every lambda i declare automatically gets this configuration, this is a problem as i thought by default it should not be enabled.

if i put this section on a specific lambda then it will not be warmed:

    warmup:
      workWeek:
        enabled: false
      weekEnd:
        enabled: false
@juanjoDiaz
Copy link
Owner

You just do it the other way around.

In the general config, you configure your warmers as disabled:

custom:
  warmup:
    workWeek:
      enabled: false
      events:
        - schedule: cron(*/10 5-19 ? * SUN-FRI *)
      concurrency: 3
      prewarm: false
      cleanFolder: false
      role: IamRoleLambdaExecution
    weekEnd:
      enabled: false
      events:
        - schedule: cron(*/30 5-13 ? * SAT *)
      concurrency: 1
      prewarm: false
      cleanFolder: false
      role: IamRoleLambdaExecution

and in the specific lambdas that you want to warm, you enable the warmer(s) that you want:

    warmup:
      workWeek:
        enabled: true
      weekEnd:
        enabled: true

@arielbeckjit
Copy link
Author

You just do it the other way around.

In the general config, you configure your warmers as disabled:

custom:
  warmup:
    workWeek:
      enabled: false
      events:
        - schedule: cron(*/10 5-19 ? * SUN-FRI *)
      concurrency: 3
      prewarm: false
      cleanFolder: false
      role: IamRoleLambdaExecution
    weekEnd:
      enabled: false
      events:
        - schedule: cron(*/30 5-13 ? * SAT *)
      concurrency: 1
      prewarm: false
      cleanFolder: false
      role: IamRoleLambdaExecution

and in the specific lambdas that you want to warm, you enable the warmer(s) that you want:

    warmup:
      workWeek:
        enabled: true
      weekEnd:
        enabled: true

got it, when i tried it in former versions it looked like warmers were not created. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants