Skip to content

Commit

Permalink
chore(ec2): invalid Interface VPC Endpoints (#31441)
Browse files Browse the repository at this point in the history
### 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*
  • Loading branch information
badmintoncryer authored Sep 18, 2024
1 parent b3b9aa8 commit 1581190
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 1581190

Please sign in to comment.