(lambda): Not able to provision concurrency for the current version of a lambda
See original GitHub issueNot able to provision concurrency for the current version of a lambda
Reproduction Steps
I have a simple stack below to configure provisioned concurrency for a lambda
export class LambdaAutoScalingStack extends cdk.Stack {
constructor(scope: cdk.App, id: string) {
super(scope, id);
new lambda.Function(this, 'lambda1', {
code: new lambda.InlineCode('exports.handler = async () => { console.log(\'hello world\'); };'),
handler: 'index.handler',
runtime: lambda.Runtime.NODEJS_10_X,
currentVersionOptions: {
provisionedConcurrentExecutions: 3
}
})
}
}
What did you expect to happen?
The lambda should have concurrency provisioned as 3
What actually happened?
No concurrency was provisioned
Environment
- CDK CLI Version : 1.94.1
- Framework Version: 1.94.1
- Node.js Version: v14.15.4
- OS : Windows
- Language (Version): TypeScript (3.9.7)
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Configuring provisioned concurrency - AWS Lambda
To manage provisioned concurrency settings for a version or alias, use the Lambda console. You can configure provisioned concurrency on a version of...
Read more >Lambda provisioned concurrency for $LATEST, or, updating ...
I have API gateway and Lambda working happily, without using any versions or aliases. I'd now like to enable provisioned concurrency. It seems...
Read more >Provisioned Concurrency for AWS Lambda functions - IT Labs
It is important to know that Provisioned concurrency can be configured ONLY on Lambda Function ALIAS or VERSION. You can't configure it against...
Read more >EnableProvisionedConcurrency - Trend Micro
Ensure that the Provisioned Concurrency performance feature is enabled for your Amazon Lambda functions in order to help your functions to scale without ......
Read more >AWS Lambda Provisioned Concurrency: The End of Cold Starts
Go to the AWS Lambda console and select an existing Lambda function. Go to the Actions drop-down menu, and then select Publish new...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. I confirm the provision is done when
fn.currentVersion
is called.// The getter call is quite unexpected. It’d be great if the constructor
lambdas.Function
invokes this getter, or hide this detail from developers.Hi @tmhung88 -
currentVersionOptions
take effect only when thecurrentVersion
getter is called.You will need to modify your code as -
The last line actually creates the
currentVersion
.