From 15811900d35a53f5efaf9f10b8acbdf16ec603c4 Mon Sep 17 00:00:00 2001 From: Kazuho Cryer-Shinozuka Date: Thu, 19 Sep 2024 06:44:17 +0900 Subject: [PATCH] chore(ec2): invalid Interface VPC Endpoints (#31441) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Issue # (if applicable) None ### Reason for this change The wrong URLs were set for several Interface Endpoints, so I corrected them. For example, when retrieving the freetier endpoint via CLI, it shows as `aws.api.{region}.freetier`, but in CDK, it was set to `com.amazonaws.{region}.freetire`. I believe this correction might be a breaking change, but since the previous URLs likely wouldn't have allowed access anyway, I'm unsure how to proceed. Which of the following approaches would be best? - Directly fix the incorrect URLs (the current implementation) - Implement a feature flag - Deprecate the existing method and implement a new one ### Description of changes Update URL from `com.amazonaws.{region}.{service}` to `aws.api.{region}.{service}` - freetier - bcm-data-exports ### Description of how you validated changes I've executed `described-vpc-endpoint-services` CLI. ```sh ❯ aws ec2 describe-vpc-endpoint-services --filters Name=service-type,Values=Interface Name=owner,Values=amazon --region us-east-1 --query ServiceNames | grep aws.api "aws.api.us-east-1.bcm-data-exports", "aws.api.us-east-1.freetier", "aws.api.us-east-1.kendra-ranking", "aws.api.us-east-1.qbusiness", ``` ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts index 7e3cedf219e09..158508d577814 100644 --- a/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts +++ b/packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts @@ -306,7 +306,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ public static readonly BEDROCK_AGENT = new InterfaceVpcEndpointAwsService('bedrock-agent'); public static readonly BEDROCK_AGENT_RUNTIME = new InterfaceVpcEndpointAwsService('bedrock-agent-runtime'); public static readonly BEDROCK_RUNTIME = new InterfaceVpcEndpointAwsService('bedrock-runtime'); - public static readonly BILLING_AND_COST_MANAGEMENT_FREETIER = new InterfaceVpcEndpointAwsService('freetier'); + public static readonly BILLING_AND_COST_MANAGEMENT_FREETIER = new InterfaceVpcEndpointAwsService('freetier', 'aws.api'); public static readonly BILLING_AND_COST_MANAGEMENT_TAX = new InterfaceVpcEndpointAwsService('tax'); public static readonly BILLING_CONDUCTOR = new InterfaceVpcEndpointAwsService('billingconductor'); public static readonly BRAKET = new InterfaceVpcEndpointAwsService('braket'); @@ -366,7 +366,7 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ public static readonly CONTROL_CATALOG = new InterfaceVpcEndpointAwsService('controlcatalog'); public static readonly COST_EXPLORER = new InterfaceVpcEndpointAwsService('ce'); public static readonly DATA_EXCHANGE = new InterfaceVpcEndpointAwsService('dataexchange'); - public static readonly DATA_EXPORTS = new InterfaceVpcEndpointAwsService('bcm-data-exports'); + public static readonly DATA_EXPORTS = new InterfaceVpcEndpointAwsService('bcm-data-exports', 'aws.api'); public static readonly DATASYNC = new InterfaceVpcEndpointAwsService('datasync'); public static readonly DATAZONE = new InterfaceVpcEndpointAwsService('datazone'); public static readonly DATABASE_MIGRATION_SERVICE = new InterfaceVpcEndpointAwsService('dms');