[英]Can I update AWS Lambda function using CloudFormation template?
[英]How can I retry a AWS CloudFormation update if an update is already happening?
尝试实现CI,每次提交都会触发CFN更新。 如何检查更新是否正在发生并强制我的脚本等待或安排在将来重试某些时间?
我看到有一个describe-stack-events,但这给了我一个列表而不是最近的事件。 有缩短的版本吗?
aws cloudformation describe-stack-events --profile dev --stack-name name --max-items 1
找到解决方案:
aws cloudformation wait stack-update-complete --stack-name name --profile dev
更多详情请访问: https : //docs.aws.amazon.com/cli/latest/reference/cloudformation/wait/index.html#cli-aws-cloudformation-wait
我在测试脚本时使用的单线程(假设会出现故障)。 它运行脚本,等待更新完成,然后返回导致问题的事件。
aws cloudformation update-stack --stack-name name --template-body file://stack.yaml && aws cloudformation wait stack-update-complete --stack-name name || aws cloudformation describe-stack-events --stack-name name | grep -B2 -A8 CREATE_FAILED
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.