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

AWSをCLIで理解したい! / I want to understand AWS usin...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.
Avatar for める める
March 01, 2026

AWSをCLIで理解したい! / I want to understand AWS using the CLI

2026/02/28 JAWS-UG 名古屋 2月回でのLT内容です。

Avatar for める

める

March 01, 2026
Tweet

More Decks by める

Other Decks in Technology

Transcript

  1. 業務での活用③ トラブルシュート対応 指定のルートが追加されているか確認してほしい時、下記のコマンドの実行結果を提示依頼 # aws ec2 describe-subnets ¥ --filters Name=vpc-id,Values=${VPC_ID}

    --query "Subnets[].SubnetId" --output text | while read subnetid do for subnet in `echo ${subnetid}`; ¥ do ¥ routetableid=$( aws ec2 describe-route-tables ¥ --filters Name=association.subnet-id,Values=${subnet} ¥ --query "RouteTables[].RouteTableId" --output text ¥ ) && echo ${routetableid} && aws ec2 describe-route-tables ¥ --filters Name=vpc-id,Values=${VPC_ID} Name=route-table-id,Values=${routetableid} ¥ --query "RouteTables[].Routes[?DestinationCidrBlock == ¥`${ADD_ROUTE_CIDR}¥`]" ¥ ; ¥ done done