0

I'm trying to create a VPC endpoint for ABC service in NAWS. My service is deployed in use-az1, use-az2, use-az3, use-az4, and use-az6 while ABC is deployed in use-az1, use-az2, use-az4, and use-az4.

My code to create VPC endpoint interface is

private createVpcInterfaceEndpoint(serviceVPCEndpoint: string, serviceName: string): InterfaceVpcEndpoint {
        return this.vpc.addInterfaceEndpoint(`${serviceName}-VPCEndpoint`, {
            service: {
                name: serviceVPCEndpoint,
                port: 443,
            },
            privateDnsEnabled: false,
            open: true,
            lookupSupportedAzs: true,
        });
    }

Despite setting lookupSupportedAzs to true it is still trying to create in subnet use-az3 which is causing deployment failure.

Why is CFN still trying in all subnets?

My cdk.context.json is updated with availability zone of ABC.

"endpoint-service-availability-zones:account=0129501:region=us-east-1:serviceName=com.amazonaws.vpce.us-east-1.vpce-svc-01eb45ffc": [
    "us-east-1a",
    "us-east-1b",
    "us-east-1c",
    "us-east-1d"
  ],
  "endpoint-service-availability-zones:account=525995:region=us-west-2:serviceName=com.amazonaws.vpce.us-west-2.vpce-svc-03dca63305": [
    "us-west-2a",
    "us-west-2b",
    "us-west-2c",
    "us-west-2d"
  ],
Belphegor21
  • 454
  • 1
  • 5
  • 24
  • Can you make the names of AZ consistent between the body of the question and the context file? How do `use-az*` map to `us-west-2*`? – gshpychka Oct 03 '22 at 09:19
  • `use-az*` is the physical location. In the end it is what matters. `us-east-1(a|b|c)` are availability zone referring to the availability zone id, https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html – Belphegor21 Oct 03 '22 at 16:21
  • And which AZs are those subnets in? Also, can you clarify the naming - you talk about "ABC service", then "ABC" and "Service" separately. I also believe there's a typo regarding the names of the subnets where ABC is deployed (`use-az4` is mentioned twice) – gshpychka Oct 05 '22 at 07:58

0 Answers0