How to do it...

We can create a VPC endpoint gateway for S3 as follows:

  1. Go to VPC service in the console.
  2. Click on Endpoints from the left sidebar.
  3. Click on Create Endpoint.
  4. For Service Category, select AWS Service.
  5. For Service Name, select com.amazonaws.us-east-1.s3:

  1. For VPC, select our custom VPC.
  2. For Route table, select our main route table.
  3. Leave the Policy as Full Access.
  1. Click on Create endpoint. We should get a success message.
  2. Try running the following S3 command from the private subnet:
aws s3 ls --region us-east-1 

This should list the S3 items successfully.

To SSH into the public EC2 instance and then SSH into the private EC2 instance, you can refer to the Launching an EC2 instance into a VPC recipe in Chapter 6Working with EC2 Instances.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.57.172