question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[aws-ec2] Interface endpoints are incorrect in China

See original GitHub issue

We are trying to create a VPC endpoint to ECR in china region (cn-north-1).

The service that comes back when running the code below is “com.amazonaws.cn-north-1.ecr.dkr”. However upon looking at aws console when manually adding a vpc ecr endpoint the service name is “cn.com.amazonaws.cn-north-1.ecr.dkr”.

As a result of the incorrect service name cloudformation throws an error stating it can’t find the service/it does not exist.

Reproduction Steps

ecr_endpoint = self.vpc.add_interface_endpoint("%s-ECREndpoint" % namespace, service= ec2.InterfaceVpcEndpointAwsService.ECR_DOCKER)

What did you expect to happen?

The right service name to be returned “cn.com.amazonaws.cn-north-1.ecr.dkr”

What actually happened?

The wrong service name came back “com.amazonaws.cn-north-1.ecr.dkr”. As a result cloudformation cannot create the vpc endpoint

Environment

  • CLI Version : 1.54.0 (build c01b9b9)
  • Framework Version:
  • Node.js Version: v12.18.3
  • OS : mac
  • Language (Version): Python (3.7.3)

Other


This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ZeBidulecommented, Oct 26, 2020

Hi, I have the same issue with the terraform data aws_vpc_endpoint_service in china :

Code

provider "aws" {
  region  = "cn-north-1"
  profile = "china"
}

data "aws_vpc_endpoint_service" "sqs" {
  service = "sqs"
}

output "sqs_endpoint_service" {
  value = data.aws_vpc_endpoint_service.sqs
}

Output

> terraform apply                                                          
data.aws_vpc_endpoint_service.sqs: Refreshing state...

Error: error reading VPC Endpoint Service (com.amazonaws.cn-north-1.sqs): InvalidServiceName: The Vpc Endpoint Service 'com.amazonaws.cn-north-1.sqs' does not exist
        status code: 400, request id: 5fb025e4-5aa5-4ba1-975e-055c98d66830

Expected result

cn.com.amazonaws.cn-north-1.sts

0reactions
github-actions[bot]commented, Aug 24, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error codes for the Amazon EC2 API - 亚马逊云科技
Amazon EC2 has two types of error codes: Client errors. These errors are usually caused by something the client did, such as specifying...
Read more >
AWS::EC2::VPCEndpoint - AWS CloudFormation
An interface endpoint establishes connections between the subnets in your VPC and an AWS service, your own service, or a service hosted by ......
Read more >
What Exactly are VPC Endpoints and Why They Need Real ...
This would prevent network access to endpoints entirely. However, that EC2 instance could be accessing a public API outside of AWS for a...
Read more >
Installing a cluster on AWS into a China region
These endpoints are required to complete requests from the nodes to the AWS EC2 API. Because the proxy works on the container level,...
Read more >
AWS EC2-Connect vs SSM-SessionManager - LinkedIn
EC2 -Connect still has many security and operational disadvantages. ... traffic for port 443 on SecurityGroups to a few AWS API endpoints/IPs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found