-
Notifications
You must be signed in to change notification settings - Fork 40
How to Resolve "EC2 Failing Instances" Alerts
| Term | Definition |
|---|---|
| EC2 Status Checks | See AWS documentation |
- Access to the CMS VPN
- Access to AWS
- An installation of the AWS CLI that is configured properly for access to the BFD/CMS AWS account
- An installation of
jq
-
Run the following command in
bashorzsh:failed_instances="$(aws ec2 describe-instance-status --query 'InstanceStatuses[?SystemStatus.Status==`impaired` || InstanceStatus.Status==`impaired`]')"; [[ -n "${failed_instances#\[\]}" ]] && echo $failed_instances && aws ec2 describe-instances --no-cli-pager --query 'Reservations[].Instances[].[InstanceId,Tags[?Key==`Name`]| [0].Value]' --output table --instance-ids $(jq -n -r '$in.[].InstanceId' --argjson in "$failed_instances")
This command will output a list, in JSON, of all of the EC2 instances that have failed their EC2 Status Checks. Additionally, a table of Instance IDs to friendly names will be printed at the end.
-
In all likelihood, the failing instances reported by the CLI command in Step #1 will be some variant of
pipeline. If this is the case, and thosepipelineinstances exist in our established environments, follow the instructions for re-deployingpipelineinstances in Resolve Failingbfd-*-pipelineInstances -
If the instances are not some variant of
pipeline, but are some variant ofserverormigratorwithin our established environments, a new deployment should be started specifying that app AMIs should be built -
If any instances do not fall in the above cases:
-
serverinstances that have been detached from their ASG in an established environment should be destroyed, and a new instance detached - Instances of any variety deployed within an ephemeral environment will require that the corresponding AMIs be re-built and the ephemeral environment re-deployed
- Other instances that do not use our typical AMIs or use the Platinum AMI will need to be restarted, or the corresponding AMI re-built and the instance re-deployed
-
This is the simplest option, and requires no knowledge of Terraform and our various Terraservices.
- Re-deploy the latest release using the BFD Deployment Pipeline ensuring that AMIs are built again
- Home
- For BFD Users
- Making Requests to BFD
- API Changelog
- Migrating to V2 FAQ
- Synthetic and Synthea Data
- BFD SAMHSA Filtering