Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ec2): update Interface VPC endpoints in China #25333

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

pahud
Copy link
Contributor

@pahud pahud commented Apr 27, 2023

This PR updates all available VPC endpoints in China regions(cn-north-1 and cn-northwest-1).

The list is retrieved from AWS CLI commands here.

Closes #25329


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

@pahud pahud requested a review from colifran April 27, 2023 06:35
@gitpod-io
Copy link

gitpod-io bot commented Apr 27, 2023

@github-actions github-actions bot added bug This issue is a bug. p2 labels Apr 27, 2023
@aws-cdk-automation aws-cdk-automation requested a review from a team April 27, 2023 06:35
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Apr 27, 2023
@pahud pahud marked this pull request as ready for review April 27, 2023 06:36
@pahud pahud changed the title chore(ec2): update VPC endpoints in China chore(ec2): update Interface VPC endpoints in China Apr 27, 2023
@@ -514,19 +514,20 @@ export class InterfaceVpcEndpointAwsService implements IInterfaceVpcEndpointServ
*/
private getDefaultEndpointPrefix(name: string, region: string) {
const VPC_ENDPOINT_SERVICE_EXCEPTIONS: { [region: string]: string[] } = {
'cn-north-1': ['application-autoscaling', 'athena', 'autoscaling', 'awsconnector', 'cassandra',
Copy link
Contributor

Choose a reason for hiding this comment

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

@pahud do you know why we are filtering for specific services? Is there ever a case where a service in cn won't have the cn prefix?

Copy link
Contributor Author

@pahud pahud Apr 27, 2023

Choose a reason for hiding this comment

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

Hi @corymhall

This is the list of all vpc interface endpoints in cn-north-1

% AWS_PROFILE=bjs AWS_REGION=cn-north-1 aws ec2 describe-vpc-endpoint-services | jq -r .ServiceNames

[
"aws.sagemaker.cn-north-1.notebook",
"aws.sagemaker.cn-north-1.studio",
"cn.com.amazonaws.cn-north-1.application-autoscaling",
"cn.com.amazonaws.cn-north-1.appmesh-envoy-management",
"cn.com.amazonaws.cn-north-1.athena",
"cn.com.amazonaws.cn-north-1.autoscaling",
"cn.com.amazonaws.cn-north-1.awsconnector",
"cn.com.amazonaws.cn-north-1.backup",
"cn.com.amazonaws.cn-north-1.batch",
"cn.com.amazonaws.cn-north-1.cassandra",
"cn.com.amazonaws.cn-north-1.cloudcontrolapi",
"cn.com.amazonaws.cn-north-1.cloudformation",
"cn.com.amazonaws.cn-north-1.codedeploy-commands-secure",
"cn.com.amazonaws.cn-north-1.databrew",
"cn.com.amazonaws.cn-north-1.dms",
"cn.com.amazonaws.cn-north-1.ebs",
"cn.com.amazonaws.cn-north-1.ec2",
"cn.com.amazonaws.cn-north-1.ecr.api",
"cn.com.amazonaws.cn-north-1.ecr.dkr",
"cn.com.amazonaws.cn-north-1.eks",
"cn.com.amazonaws.cn-north-1.elasticache",
"cn.com.amazonaws.cn-north-1.elasticbeanstalk",
"cn.com.amazonaws.cn-north-1.elasticfilesystem",
"cn.com.amazonaws.cn-north-1.elasticfilesystem-fips",
"cn.com.amazonaws.cn-north-1.emr-containers",
"cn.com.amazonaws.cn-north-1.execute-api",
"cn.com.amazonaws.cn-north-1.fsx",
"cn.com.amazonaws.cn-north-1.imagebuilder",
"cn.com.amazonaws.cn-north-1.iot.data",
"cn.com.amazonaws.cn-north-1.iotsitewise.api",
"cn.com.amazonaws.cn-north-1.iotsitewise.data",
"cn.com.amazonaws.cn-north-1.kinesis-streams",
"cn.com.amazonaws.cn-north-1.lambda",
"cn.com.amazonaws.cn-north-1.license-manager",
"cn.com.amazonaws.cn-north-1.monitoring",
"cn.com.amazonaws.cn-north-1.rds",
"cn.com.amazonaws.cn-north-1.redshift",
"cn.com.amazonaws.cn-north-1.redshift-data",
"cn.com.amazonaws.cn-north-1.s3",
"cn.com.amazonaws.cn-north-1.sagemaker.api",
"cn.com.amazonaws.cn-north-1.sagemaker.featurestore-runtime",
"cn.com.amazonaws.cn-north-1.sagemaker.runtime",
"cn.com.amazonaws.cn-north-1.securityhub",
"cn.com.amazonaws.cn-north-1.servicecatalog",
"cn.com.amazonaws.cn-north-1.sms",
"cn.com.amazonaws.cn-north-1.sqs",
"cn.com.amazonaws.cn-north-1.states",
"cn.com.amazonaws.cn-north-1.sts",
"cn.com.amazonaws.cn-north-1.sync-states",
"cn.com.amazonaws.cn-north-1.synthetics",
"cn.com.amazonaws.cn-north-1.transcribe.cn",
"cn.com.amazonaws.cn-north-1.transcribestreaming",
"cn.com.amazonaws.cn-north-1.transfer",
"cn.com.amazonaws.cn-north-1.xray",
"com.amazonaws.cn-north-1.codebuild",
"com.amazonaws.cn-north-1.codecommit",
"com.amazonaws.cn-north-1.datasync",
"com.amazonaws.cn-north-1.dynamodb",
"com.amazonaws.cn-north-1.ec2messages",
"com.amazonaws.cn-north-1.ecs",
"com.amazonaws.cn-north-1.ecs-agent",
"com.amazonaws.cn-north-1.ecs-telemetry",
"com.amazonaws.cn-north-1.elasticbeanstalk-health",
"com.amazonaws.cn-north-1.elasticloadbalancing",
"com.amazonaws.cn-north-1.elasticmapreduce",
"com.amazonaws.cn-north-1.git-codecommit",
"com.amazonaws.cn-north-1.glue",
"com.amazonaws.cn-north-1.kinesis-firehose",
"com.amazonaws.cn-north-1.kms",
"com.amazonaws.cn-north-1.logs",
"com.amazonaws.cn-north-1.s3",
"com.amazonaws.cn-north-1.secretsmanager",
"com.amazonaws.cn-north-1.sns",
"com.amazonaws.cn-north-1.ssm",
"com.amazonaws.cn-north-1.ssmmessages",
"com.amazonaws.cn-north-1.storagegateway",
"com.amazonaws.cn-north-1.swf"
]

And in cn-northwest-1

% AWS_PROFILE=bjs AWS_REGION=cn-northwest-1 aws ec2 describe-vpc-endpoint-services | jq -r .ServiceNames

[
"aws.sagemaker.cn-northwest-1.notebook",
"aws.sagemaker.cn-northwest-1.studio",
"cn.com.amazonaws.cn-northwest-1.account",
"cn.com.amazonaws.cn-northwest-1.application-autoscaling",
"cn.com.amazonaws.cn-northwest-1.appmesh-envoy-management",
"cn.com.amazonaws.cn-northwest-1.athena",
"cn.com.amazonaws.cn-northwest-1.autoscaling",
"cn.com.amazonaws.cn-northwest-1.awsconnector",
"cn.com.amazonaws.cn-northwest-1.backup",
"cn.com.amazonaws.cn-northwest-1.batch",
"cn.com.amazonaws.cn-northwest-1.cassandra",
"cn.com.amazonaws.cn-northwest-1.cloudcontrolapi",
"cn.com.amazonaws.cn-northwest-1.cloudformation",
"cn.com.amazonaws.cn-northwest-1.codedeploy-commands-secure",
"cn.com.amazonaws.cn-northwest-1.databrew",
"cn.com.amazonaws.cn-northwest-1.dms",
"cn.com.amazonaws.cn-northwest-1.ebs",
"cn.com.amazonaws.cn-northwest-1.ec2",
"cn.com.amazonaws.cn-northwest-1.ecr.api",
"cn.com.amazonaws.cn-northwest-1.ecr.dkr",
"cn.com.amazonaws.cn-northwest-1.eks",
"cn.com.amazonaws.cn-northwest-1.elasticache",
"cn.com.amazonaws.cn-northwest-1.elasticbeanstalk",
"cn.com.amazonaws.cn-northwest-1.elasticfilesystem",
"cn.com.amazonaws.cn-northwest-1.elasticfilesystem-fips",
"cn.com.amazonaws.cn-northwest-1.emr-containers",
"cn.com.amazonaws.cn-northwest-1.execute-api",
"cn.com.amazonaws.cn-northwest-1.fsx",
"cn.com.amazonaws.cn-northwest-1.imagebuilder",
"cn.com.amazonaws.cn-northwest-1.iot.data",
"cn.com.amazonaws.cn-northwest-1.kinesis-streams",
"cn.com.amazonaws.cn-northwest-1.lambda",
"cn.com.amazonaws.cn-northwest-1.license-manager",
"cn.com.amazonaws.cn-northwest-1.monitoring",
"cn.com.amazonaws.cn-northwest-1.polly",
"cn.com.amazonaws.cn-northwest-1.rds",
"cn.com.amazonaws.cn-northwest-1.redshift",
"cn.com.amazonaws.cn-northwest-1.redshift-data",
"cn.com.amazonaws.cn-northwest-1.s3",
"cn.com.amazonaws.cn-northwest-1.sagemaker.api",
"cn.com.amazonaws.cn-northwest-1.sagemaker.featurestore-runtime",
"cn.com.amazonaws.cn-northwest-1.sagemaker.runtime",
"cn.com.amazonaws.cn-northwest-1.securityhub",
"cn.com.amazonaws.cn-northwest-1.servicecatalog",
"cn.com.amazonaws.cn-northwest-1.sms",
"cn.com.amazonaws.cn-northwest-1.sqs",
"cn.com.amazonaws.cn-northwest-1.states",
"cn.com.amazonaws.cn-northwest-1.sts",
"cn.com.amazonaws.cn-northwest-1.sync-states",
"cn.com.amazonaws.cn-northwest-1.synthetics",
"cn.com.amazonaws.cn-northwest-1.transcribe.cn",
"cn.com.amazonaws.cn-northwest-1.transcribestreaming",
"cn.com.amazonaws.cn-northwest-1.transfer",
"cn.com.amazonaws.cn-northwest-1.workspaces",
"cn.com.amazonaws.cn-northwest-1.xray",
"com.amazonaws.cn-northwest-1.codebuild",
"com.amazonaws.cn-northwest-1.codecommit",
"com.amazonaws.cn-northwest-1.datasync",
"com.amazonaws.cn-northwest-1.dynamodb",
"com.amazonaws.cn-northwest-1.ec2messages",
"com.amazonaws.cn-northwest-1.ecs",
"com.amazonaws.cn-northwest-1.ecs-agent",
"com.amazonaws.cn-northwest-1.ecs-telemetry",
"com.amazonaws.cn-northwest-1.elasticbeanstalk-health",
"com.amazonaws.cn-northwest-1.elasticloadbalancing",
"com.amazonaws.cn-northwest-1.elasticmapreduce",
"com.amazonaws.cn-northwest-1.git-codecommit",
"com.amazonaws.cn-northwest-1.glue",
"com.amazonaws.cn-northwest-1.kinesis-firehose",
"com.amazonaws.cn-northwest-1.kms",
"com.amazonaws.cn-northwest-1.logs",
"com.amazonaws.cn-northwest-1.s3",
"com.amazonaws.cn-northwest-1.secretsmanager",
"com.amazonaws.cn-northwest-1.sns",
"com.amazonaws.cn-northwest-1.ssm",
"com.amazonaws.cn-northwest-1.ssmmessages",
"com.amazonaws.cn-northwest-1.storagegateway",
"com.amazonaws.cn-northwest-1.swf"
]

number of services with cn prefix: 52
number of services with com prefix: 23

As most of them are having cn.com.amazonaws, maybe we should make cn.com.amazonaws as the default for CN regions and com.amazonaws for the exception list instead?

Copy link
Contributor Author

@pahud pahud Apr 27, 2023

Choose a reason for hiding this comment

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

hmmm I am afraid it's still very challenging to do that.

If we review all cn perfix vpce, Some are only available in cn-northwest-1 and some only available in cn-north-1

only available in cn-north-1: iotsitewise.api, iotsitewise.data
only available in cn-northwest-1: account, workspaces

And all the 23 vpce with com prefix are available in both cn regions.

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok so it is not consistent, some services are available in the cn region without the cn prefix. Got it.

@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

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

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 3b2a223
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 2935b92 into aws:main Apr 27, 2023
@mergify
Copy link
Contributor

mergify bot commented Apr 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. contribution/core This is a PR that came from AWS. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws-ec2: Elasticache Interface VPC endpoint service name in China regions is incorrect
3 participants