Channels
welcome
pulumi-cdk
cloudengineering
yaml
blog-posts
localstack
pulumi-ai
package-authoring
general
pulumiup-booth-support
oracle-cloud-infrastructure
learn-pulumi-events
linen
registry
built-with-pulumi
pulumi-cloud
contribex
testingtesting321
hacktoberfest
pulumi-crosscode
content-share
finops
multi-language-hackathon
office-hours
workshops
gitlab
pulumi-kubernetes-operator
jobs
pulumi-deployments
dotnet
aws
golang
announcements
java
pulumiverse
python
install
getting-started
cloudengineering-support
testingtesting123
hackathon-03-19-2020
typescript
google-cloud
contribute
azure
kubernetes
docs
automation-api
status
Powered by
#general
Title
b
brash-plastic-65797
09/26/2019, 9:52 PM
AWS suggests that you create alarms for EC2 instances which recover/reboot the instance if the status checks fail. This is easy to create through the AWS console, but having some trouble with Pulumi
const bastionSystemStatus = awsx.ec2.metrics.statusCheckFailed_System({ instance: bastion }); bastionSystemStatus.createAlarm(“bastion-sys-failed”, { threshold: 1, evaluationPeriods: 2, alarmActions: [/* recover instance */] });
I’m not sure what to define for alarmActions to cause a “recovery” to happen.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UsingAlarmActions.html#AddingRecoverActions
Found the ARN’s here:
https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html
I’ll let everyone know if that works
That worked!
arn
aws
automate
region
ec2:stop | arn
aws
automate
region
ec2:terminate | arn
aws
automate
region
ec2:recover | arn
aws
automate
region
ec2:reboot
Post