Belajar Sendiri

Commands

aws ec2 delete-nat-gateway --nat-gateway-id

aws ec2 delete-nat-gateway --nat-gateway-id <nat>

Risk: Careful

What it does

Deletes a NAT gateway, which bills every hour it exists.

When to use it

After practice. Back rooms lose their way out. Then release its Elastic IP too.

Example

$ aws ec2 delete-nat-gateway --nat-gateway-id nat-04ae55e711cec5680

Stop the hourly NAT bill.

$ aws ec2 describe-nat-gateways

Find NAT gateways you forgot.

$ aws ec2 release-address --allocation-id eipalloc-64d5890a

Give back the Elastic IP, so it stops billing.