Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mayuthombre/c02-network06 #1937

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions classes/02class/exercises/c02-network06/mayuthombre/ANSWER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# c02-network06

## Commands Execution Output

- Commands for creating the NAT gateway:

The following create-nat-gateway creates a public NAT gateway in the public subnet (a) we created in earlier exercise and associates the Elastic IP address with the specified allocation ID. When you create a public NAT gateway, you must associate an Elastic IP address. Therefore, first lets allocate an Elastic IP

```
aws ec2 allocate-address

Output
{
"PublicIp": "13.52.25.41",
"AllocationId": "eipalloc-0cbe2daff1a2e2788",
"PublicIpv4Pool": "amazon",
"NetworkBorderGroup": "us-west-1",
"Domain": "vpc"
}



aws ec2 create-nat-gateway \
--subnet-id subnet-028f49f43c269bbb6 \
--allocation-id eipalloc-0cbe2daff1a2e2788

Output
{
"ClientToken": "950eb5e6-a4cf-4165-9c1d-221188f5b76c",
"NatGateway": {
"CreateTime": "2022-08-29T01:49:39+00:00",
"NatGatewayAddresses": [
{
"AllocationId": "eipalloc-0cbe2daff1a2e2788"
}
],
"NatGatewayId": "nat-0824a2c60f306cb4a",
"State": "pending",
"SubnetId": "subnet-028f49f43c269bbb6",
"VpcId": "vpc-0c6f909f7f7dd06d7",
"ConnectivityType": "public"
}
}
```

Finally, lets add a name to our NAT gateway so that we can easily identify it.

```
aws ec2 create-tags \
--resources nat-0824a2c60f306cb4a --tags Key=Name,Value=devopsacademy-ngw

Output
- Any extra challenges faced?
NONE


***
Answer for exercise [c02-network06](https://github.com/devopsacademyau/academy/blob/893381c6f0b69434d9e8597d3d4b1c17f9bc1371/classes/02class/exercises/c02-network06/README.md)