Open brettstack opened 4 years ago
Documentation here https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_RollbackConfiguration.html
We'll need to add this as a top-level entry to serverless.yaml
and add the correct Alarm resources
RollbackConfiguration:
MonitoringTimeInMinutes: 30
RollbackTriggers:
- Arn: !GetAtt MyAlarm.Arn
Type: AWS::CloudWatch::Alarm
- Arn: !GetAtt MySecondAlarm.Arn
Type: AWS::CloudWatch::Alarm
We have some basic alarms defined using a Serverless Framework Plugin https://github.com/wizeline/serverless-fullstack/blob/master/serverless.yaml#L118. You'll need to look at the generated CloudFormation template to discover the correct names of the AWS::CloudWatch::Alarm Resources
CloudFormation should automatically roll back when the 5xx alarms fire.