Skip to content

Commit

Permalink
GITBOOK-650: change request with no subject merged in GitBook
Browse files Browse the repository at this point in the history
  • Loading branch information
fborsani authored and gitbook-bot committed May 1, 2024
1 parent 4562379 commit b7c40d5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cloud-aws/vpc/expose-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,23 @@ Assign public IP to attached ENI. The required IDs are the ENI (eni-xxxx) and th

## Modify Routing Table to allow public traffic

Get VPC and subnets of EC2 instances

```
aws ec2 describe-instances --query "Reservations[].Instances[].[InstanceId, VpcId, SubnetId]" --output text
```

Get a list of available gateways in current VPC. Save the ID of a gateway to use to route traffic outside the VPC

```
aws ec2 describe-internet-gateways
```

Get routing tables
Get routing tables of specified VPC and subnet

```
aws ec2 describe-route-tables
aws ec2 describe-route-tables --filters "Name=vpc-id,Values=<vpc id>" "Name=association.subnet-id,Values=<subnet id>"
aws ec2 describe-route-tables --filters "Name=vpc-id,Values=<vpc id>" "Name=association.subnet-id,Values=<subnet id>" --query "RouteTables[].[RouteTableId, Routes[*]]" --output text
```

Edit the routing table to allow traffic from the VPC to the internet
Expand Down

0 comments on commit b7c40d5

Please sign in to comment.