1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

autoscalingと起動テンプレート用CSVファイル

Posted at
# Auto Scalingグループの情報を取得し、CSVファイルに直接書き込む
aws autoscaling describe-auto-scaling-groups \
    --query "AutoScalingGroups[*].{AutoScalingGroupName:AutoScalingGroupName, LaunchTemplateId:LaunchTemplate.LaunchTemplateId, Version:LaunchTemplate.Version}" \
    --output json | \
jq -r '.[] | [.AutoScalingGroupName, .LaunchTemplateId, .Version] | @csv' > autoscaling_groups.csv

aws ec2 describe-launch-template-versions \
    --launch-template-id <LaunchTemplateId> \
    --versions <Version> \
    --query "LaunchTemplateVersions[*].[LaunchTemplateId, Version, LaunchTemplateData.ImageId]" \
    --output text | \
awk '{print $1","$2","$3}' > launch_template_ami_info.csv

1
0
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?