Skip to content

Conversation

@salah1994-sys
Copy link
Contributor

@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.

@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
@salah1994-sys salah1994-sys marked this pull request as ready for review December 22, 2025 17:21
@salah1994-sys salah1994-sys force-pushed the feat/eusc-region-vpc-endpoint branch from 5d96177 to 2468dbd Compare December 22, 2025 17:21
CONTRIBUTORS.md Outdated
Comment on lines 30 to 33
- [salah1994-sys](https://github.com/salah1994-sys)


_Last updated: Mon, 01 Dec 25 00:16:16 +0000_
_Last updated: Mon, 22 Dec 25 14:16:16 +0000_
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is updated automatically by a bot when reaching a specific number of contributions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, updated the commit, removed changes made to CONTRIBUTORS.md

@github-actions
Copy link
Contributor

github-actions bot commented Dec 23, 2025

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ☑️SkippedFailed ❌️
Security Guardian Results50 ran49 passed1 failed
TestResult
Security Guardian Results
packages/@aws-cdk-testing/framework-integ/test/aws-ec2/test/integ.vpc-endpoint-eusc.js.snapshot/aws-cdk-ec2-vpc-endpoint-eusc.template.json
ec2-no-open-security-groups.guard❌ failure

@github-actions
Copy link
Contributor

github-actions bot commented Dec 23, 2025

⚠️ Experimental Feature: This security report is currently in experimental phase. Results may include false positives and the rules are being actively refined.
Please try merge from main to avoid findings unrelated to the PR.


TestsPassed ✅SkippedFailed
Security Guardian Results with resolved templates50 ran50 passed
TestResult
No test annotations available

@aemada-aws aemada-aws self-assigned this Dec 23, 2025
@salah1994-sys salah1994-sys force-pushed the feat/eusc-region-vpc-endpoint branch from 2468dbd to ced186a Compare December 23, 2025 15:50
….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 ced186a to e05fea1 Compare December 23, 2025 15:51
@mergify
Copy link
Contributor

mergify bot commented Dec 23, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit d5561e0 into aws:main Dec 23, 2025
22 of 25 checks passed
@mergify
Copy link
Contributor

mergify bot commented Dec 23, 2025

Merge Queue Status

✅ The pull request has been merged at e05fea1

This pull request spent 5 seconds in the queue, with no time running CI.
The checks were run in-place.

Required conditions to merge

@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants