Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AWS CLIで月160万円の負債を 解消した話 / AWS CLI debt resolution

OouchiNaoki
September 20, 2020

AWS CLIで月160万円の負債を 解消した話 / AWS CLI debt resolution

AWS CLIで月160万円の負債を 解消した話 / AWS CLI debt resolution
https://www.ooooouchi.info/

OouchiNaoki

September 20, 2020
Tweet

More Decks by OouchiNaoki

Other Decks in Programming

Transcript

  1. େ಺ ௚थ @NaoNoaNaoNoaN • System Shared, Inc. • AWS, Nuxt.js,

    Node.js, TypeScript • ٳ೔͸Α͘ເͷࠃʹߦ·͢ • ϒϩάॻ͍ͯ·͢ https://www.ooooouchi.info/
  2. EC2Πϯελϯε࡟আ INSTANCE_IDS=$( aws ec2 describe-instances \ --region $1 \ --filters

    “Name=instance-state-name, Values=pending,running,stopped,stopping" \ --query "Reservations[].Instances[].[InstanceId]" \ --output text | sed -e "s/[\r\n]\+//g" ) if [ -n "${INSTANCE_IDS[0]}" ]; then aws ec2 terminate-instances \ --instance-ids ${INSTANCE_IDS} \ --region $1 fi