65 cards
Posted over 2 years ago. Visible to the public.

HowTo: enable termination protection for all EC2 instances not in autoscaling groups via aws cli

Copy
aws ec2 describe-instances --output text --query 'Reservations[].Instances[?!not_null(Tags[?Key == `aws:autoscaling:groupName`].Value)] | [].[InstanceId]' | xargs -L1 -t aws ec2 modify-instance-attribute --disable-api-termination --instance-id

Your development team has a full backlog of feature requests, chores and refactoring coupled with deadlines? We are familiar with that. With our "DevOps as a Service" offering, we support developer teams with infrastructure and operations expertise.

Owner of this card:

Avatar
Claus-Theodor Riegg
Last edit:
over 2 years ago
by Claus-Theodor Riegg
Keywords:
disable-api-termination, api, termination
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
This website uses short-lived cookies to improve usability.
Accept or learn more