Skip to content

Conversation

@salah1994-sys
Copy link

@salah1994-sys salah1994-sys commented Dec 21, 2025

Reason for this change

For the new region eusc-de-east-1 will be launched in AWS European Sovereign Cloud, services like:-

  • ECR
  • API Gateway
  • Security Hub

They have their VPC endpoint service name starts with prefix eu.amazonaws rather than the default com.amazonaws

This requires special handling similar to what's already implemented for China regions cn-north-1 & cn-northwest-1 otherwise, while deploying, CloudFormation stacks will hit the error "The Vpc Endpoint Service com.amazonaws.eusc-de-east-1.ecr.dkr does not exist"

Description of changes

In the file packages/aws-cdk-lib/aws-ec2/lib/vpc-endpoint.ts, I am updating the method getDefaultEndpointPrefix, adding special handling for eusc-de-east-1 when services are ['ecr.dkr', 'ecr.api', 'execute-api', 'securityhub'] to return eu.amazonaws instead of com.amazonaws. This is similar to what's already existing for China regions.

Description of how you validated changes

I also updated packages/aws-cdk-lib/aws-ec2/test/vpc-endpoint.test.ts to cover unit tests and was confirmed tests are passed

maelnabi@c889f3aaec8b aws-cdk-lib % yarn test aws-ec2
yarn run v1.22.22
$ jest aws-ec2
 PASS  aws-ec2/test/volume.test.ts (13.106 s)
 PASS  aws-ec2/test/instance.test.ts (14.333 s)
 PASS  aws-ec2/test/vpc.test.ts (15.864 s)
 PASS  aws-ec2/test/vpc-endpoint.test.ts (17.116 s)
 PASS  aws-ec2/test/launch-template.test.ts
 PASS  aws-ec2/test/security-group.test.ts
 PASS  aws-ec2/test/vpc-flow-logs.test.ts
 PASS  aws-ec2/test/userdata.test.ts
 PASS  aws-ec2/test/cfn-init.test.ts
 PASS  aws-ec2/test/cfn-init-element.test.ts
 PASS  aws-ec2/test/machine-image.test.ts
 PASS  aws-ec2/test/ip-addresses.test.ts
 PASS  aws-ec2/test/vpc.from-lookup.test.ts
 PASS  aws-ec2/test/connections.test.ts
 PASS  aws-ec2/test/vpc-endpoint-service.test.ts
 PASS  aws-ec2/test/vpn.test.ts
 PASS  aws-ec2/test/client-vpn-endpoint.test.ts
 PASS  aws-ec2/test/prefix-list.test.ts
 PASS  aws-ec2/test/network-utils.test.ts
 PASS  aws-ec2/test/bastion-host.test.ts
 PASS  aws-ec2/test/aspects/require-imdsv2-aspect.test.ts
 PASS  aws-ec2/test/client-vpn-route.test.ts
 PASS  aws-ec2/test/key-pair.test.ts
 PASS  aws-ec2/test/client-vpn-authorization-rule.test.ts
 PASS  aws-ec2/test/placement-group.test.ts
 PASS  aws-ec2/test/cidr-splits.test.ts
 PASS  aws-ec2/test/instance-requirements.test.ts
 PASS  aws-ec2/test/l1.test.ts
 PASS  aws-ec2/test/instance-type.test.ts

=============================== Coverage summary ===============================
Statements   : 59.25% ( 12033/20308 )
Branches     : 41.58% ( 3168/7618 )
Functions    : 43.44% ( 1860/4281 )
Lines        : 60.55% ( 11632/19210 )
================================================================================

Test Suites: 29 passed, 29 total
Tests:       941 passed, 941 total
Snapshots:   0 total
Time:        29.278 s
Ran all test suites matching /aws-ec2/i.
✨  Done in 32.88s.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team December 21, 2025 21:56
@github-actions github-actions bot added p2 beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK labels Dec 21, 2025
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(This review is outdated)

@salah1994-sys salah1994-sys marked this pull request as ready for review December 22, 2025 14:25
@salah1994-sys salah1994-sys force-pushed the feat/eusc-region-vpc-endpoint branch 2 times, most recently from f26c349 to 777dafd Compare December 22, 2025 14:48
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 22, 2025 14:50

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

….amazonaws for new region eusc-de-east-1 for ECR & API Gateway services
@salah1994-sys salah1994-sys force-pushed the feat/eusc-region-vpc-endpoint branch from 777dafd to 5d96177 Compare December 22, 2025 14:50
@salah1994-sys salah1994-sys marked this pull request as draft December 22, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants