- Más nuevo
- Más votos
- Más comentarios
Hello,
I think aws S3 + CodePipeline + Cloudformation can help you solve this problem.
You can upload the updated lambda code to aws s3 and set it as the trigger source of CodePipeline, copy this source file to the s3 bucket of all Regions you need, and then use the code files of each region to execute in CodePipeline Cross-region cloud formation deployment.
Here is a guide from AWS about multi-region deployment that I think you can refer to.
In addition, based on my previous experience of using CodePipeline to deploy lambda, if the file URL deployed each time is the same, cloudformation will not update the lambda code.
To solve this problem you need to use the aws sam template instead of the cloudformation template. Specify AutoPublishAlias
and AutoPublishCodeSha256
for AWS::Serverless::Function in the sam template. You need to provide a unique AutoPublishCodeSha256
for each deployment.
If you want to change regions, please directly change the codepipeline configuration, but the deployed cloudformation stack may remain in the old region.
Contenido relevante
- OFICIAL DE AWSActualizada hace 5 meses
- OFICIAL DE AWSActualizada hace 4 meses
Thank you, I pretty much end up doing the thing you suggested