Created
December 4, 2019 23:48
-
-
Save me2resh/b89a03cbdf0721394f68784a0926b15e to your computer and use it in GitHub Desktop.
How to use lambda provisioned concurrency in aws sam
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameters: | |
FnName: | |
Type: String | |
ProvisionedConcurrency: | |
Type: String | |
Default: 10 | |
EnableAliasProvisionedConcurrency: | |
Type: String | |
AllowedValues: | |
- true | |
- false | |
Default: true | |
Conditions: | |
AliasProvisionedConcurrencyEnabled: !Equals [!Ref EnableAliasProvisionedConcurrency, true] | |
Resources: | |
MinimalFunction: | |
Type: 'AWS::Serverless::Function' | |
Properties: | |
CodeUri: s3://sam-demo-bucket/hello.zip | |
Handler: hello.handler | |
Runtime: python2.7 | |
DeploymentPreference: | |
Type: Linear10PercentEvery3Minutes | |
ProvisionedConcurrencyConfig: !If | |
- AliasProvisionedConcurrencyEnabled | |
- ProvisionedConcurrentExecutions: !Ref ProvisionedConcurrency | |
- !Ref 'AWS::NoValue' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Beauty. Thanks