Recently we added the canary deployment plugin to our application so we could rollout our deployment without issues with database connection creations.
Now we want to configure provisioned concurrency configuration to our lambda. We can add the configuration in AWS console adding provisioned concurrency configuration to current versions, instead of to the alias.
But when configuring it with serverless, there is not option to add the provisioned concurrency to the version being deployed, just to an alias.
We can’t make the deployment work like that, it does not matter if we use the same alias or different alias for the deployment configuration and the provisioned configuration.
With the same alias, the deploy fails stating the conflict. If we use different alias, it publishes, but only one alias will be referenced by the api gateway and the result is not as expected.
So is those plugin incompatible?
Which would be the right way to accomplish a canary deploy that no only phaseout the old version to a new one and also move the provisioned configuration to the new version?
Here is a sample of what I’m trying to do:
main:
vpc: ${self:custom.config.vpc_configs}
handler: src/lambda.handler
reservedConcurrency: 1000
provisionedConcurrency: 14
timeout: 30
events:
- http:
method: any
path: /{any+}
cors: true
deploymentSettings:
type: Canary10Percent5Minutes
alias: Live
concurrencyAutoscaling:
enabled: true
alias: Live
maximum: 14
minimum: 14
scheduledActions:
- name: OpenBusinessTime
schedule: 'cron(0 7 * * ? *)'
action:
maximum: 28
minimum: 28
- name: CloseBusinessTime
schedule: 'cron(0 19 * * ? *)'
action:
maximum: 14
minimum: 14