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

Leverage native Provisioned Concurrency #201

Open
devasur opened this issue Dec 5, 2019 · 2 comments
Open

Leverage native Provisioned Concurrency #201

devasur opened this issue Dec 5, 2019 · 2 comments
Labels

Comments

@devasur
Copy link

devasur commented Dec 5, 2019

As we know AWS has announced a native Keep Warm routine using Provisioned Concurrency - supported through console as well as config. Serverless also has added Yaml support for this feature.

However they fall short in terms of flexible configuration options - such as the ability to control concurrency per schedules.

Since this plugin is flexible can we modify it to leverage the provisionedConcurrency while keeping all the flexibility it offers in scheduling?

  const params = {
    FunctionName: 'MyFunctionName',
    ProvisionedConcurrentExecutions: '5'
  };
  const lambda = new AWS
  lambda.putProvisionedConcurrency(params, function(err, data) {
    if (err) console.log(err, err.stack); // an error occurred
    else     console.log(data);           // successful response
  });
};
`
@juanjoDiaz
Copy link
Owner

Hi @devasur,
Sorry for the long silence.

I guess that you mean adding that putProvisionedConcurrency to the generated warmup lambda. However, that would be the same as just setting it all the time since at any time we'll be removing the provisioned concurrency. A smarter strategy is needed here.

@khaledosman
Copy link
Contributor

I tried commenting out this plugin usage in favor of provisionedConcurrency however I could see in the serverless dashboard that my functions were still having coldstarts.

I can't tell why, but I don't think provisionedConcurrency via serverless is as reliable so I'm reverting to using this plugin again.

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

3 participants