A VPC peering connects the Control Room AWS account and the API Task AWS account. VPC peering enables secure and low-latency communication between the resources available in both accounts without the need for an internet gateway or a VPN connection.

Create a peering connection request in the Control Room AWS VPC and accept it in the API Task AWS VPC to establish VPC peering between the AWS accounts.

Prerequisites

Ensure that you have the following information before you start the VPC peering setup:
  • Account IDs of both AWS accounts.
  • AWS region.
  • IDs of the VPCs in both the AWS accounts.
  • IPv4 CIDR block of both the AWS accounts.

Procedure

  1. Log into the Control Room AWS account console.
  2. Go to the VPC console and perform the following steps in the VPC dashboard.
    1. Go to Virtual private cloud > Peering Connections and click Create peering connection.
      The Create peering connection page appears.
    2. Optional: Enter a name for the connection in Name .
    3. Select the Control Room AWS VPC in VPC ID (Requester).
      The VPC CIDR block of the Control Room AWS VPC appears automatically below this field.
    4. Select Another account in Select another VPC to peer with .
    5. Enter the account ID of the API Task AWS account in Account ID.
    6. Select This Region in Region.
      API Task on AWS private cloud requires that both AWS accounts must be in the same region to reduce latency.
    7. Enter the VPC ID of the API Task AWS account in VPC ID (Accepter).
    8. Optional: Click Add new tag to apply a tag to the peering connection.
    9. Select Create peering connection to create the peering connection.
      Once you create the peering, the connection appears on the Peering Connections dashboard. You must then log in to the API Task AWS account to accept the incoming connection.
  3. Log in to the API Task AWS account console.
  4. Go to the VPC console and perform the following steps in the VPC dashboard.
    1. Go to Virtual private cloud > Peering Connections.
    2. Select the pending VPC peering connection with Pending acceptance status, and then select Actions > Accept request.
      Note: Ensure that you validate the details of the acceptance request before accepting the request. Select the Actions > View details to view the request details.
    3. Select Accept request in the confirmation prompt.
      The status of the peering connection changes to Active in the Peering connections dashboard.

Next steps

Once you complete the VPC peering, you must update the route tables of both AWS accounts to ensure that the data traffic routes through the VPC peering that you have set up.