반응형
AWS CLI - resource delete command
코드에 $ 으로 되어 있는 부분은 실제 리소스의 정보를 확인해야 한다는 의미입니다. (입력되어 있는 값은 샘플 값입니다.)
ElastiCache Redis 삭제
aws elasticache delete-replication-group --replication-group-id $cluster-id
EC2 삭제
aws ec2 terminate-instances --instance-ids $i-12b8a75a782f775
AMI 삭제
aws ec2 deregister-image --image-id $ami-4af50426
ec2 snapshot 삭제
aws ec2 delete-snapshot --snapshot-id $snap-1234567890abcdef0
aws ec2 delete-snapshot --region us-west-2 --snapshot-id $snap-1234567890abcdef0
rds snapshot 삭제
aws rds delete-db-snapshot --region us-east-1 --db-snapshot-identifier $snap-9281393
security group 삭제
aws ec2 delete-security-group --group-id $sg-9300408f
elastic ip 빼기
aws ec2 release-address --public-ip $198.151.199.120
elastic ip 삭제
aws ec2 release-address --allocation-id $eipalloc-6d4598a0
cloudfront 삭제 (cloudfront:DeleteDistribution 롤 필요)
aws cloudfront get-distribution --id $EDFDVBD6EXAMPLE | grep -i etag
aws cloudfront delete-distribution --id $EDFDVBD6EXAMPLE --if-match $E2QWRUHEXAMPLE
by mkdir-chandler
728x90
반응형
'Ops > AWS' 카테고리의 다른 글
AWS CLI - configure 설정 방법 (Win / Linux) (0) | 2023.03.20 |
---|---|
AWS CLI - 설치 방법 (Win, Linux) (0) | 2023.03.19 |
AWS Batch - No space left on device (0) | 2023.03.17 |
AWS 보안 Tip - VPC Endpoint 활용 (0) | 2023.03.16 |
AWS 보안 Tip - VPC default 설정 삭제 (0) | 2023.03.15 |