Copilot-cli: China regions(partition 'aws-cn') support

Created on 21 Apr 2020  Â·  6Comments  Â·  Source: aws/copilot-cli

Create a project like below,

ecs-preview project init
Looks like you are using a workspace that's registered to project nexus3.
We'll use that as your project.
✘ Failed to create the infrastructure to manage container repositories under project nexus3.
Error: failed to create stack nexus3-infrastructure-roles: ResourceNotReady: failed waiting for successful resource state

Checked the events of cloudformation stack, see below error,

Partition "aws" is not valid for resource "arn:aws:iam::*:role/nexus3-adminrole". (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: d902d514-01f0-4eb5-a341-2292ec5c95d5)
typbug typrequest

Most helpful comment

Ok yeah, the CLI doesn't support the "aws-cn" partition because it uses StackSets under the hood for project management which is not supported in China: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html#stacksets-availability

We also have the AWS partition hard-coded in some parts of the CLI.
https://github.com/aws/amazon-ecs-cli-v2/blob/bb133e781cb03eb9e7dfd6ee9ea0bc2dd0725d26/internal/pkg/deploy/cloudformation/stack/project.go#L161-L162

I'll keep the issue open for us to be aware of the problem.

Hi @efekarakus , Stackset is now available in China region:
https://www.amazonaws.cn/en/new/2020/aws-cloudformation-stacksets-is-now-available-in-the-aws-china-regions/

Is it possible we could move on to fix the partition hard-coded issue ?
And as Code Pipeline is still not available in China region, but I guess we could just run copilot without pipeline?

Million thanks!

All 6 comments

Hi @zxkane!

Your workspace seems to have an already existing project named "nexus3", was that a previous attempt to create it in China or was it created in a different region?
I'll try to reproduce on my end at the same time.

Ok yeah, the CLI doesn't support the "aws-cn" partition because it uses StackSets under the hood for project management which is not supported in China: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html#stacksets-availability

We also have the AWS partition hard-coded in some parts of the CLI.
https://github.com/aws/amazon-ecs-cli-v2/blob/bb133e781cb03eb9e7dfd6ee9ea0bc2dd0725d26/internal/pkg/deploy/cloudformation/stack/project.go#L161-L162

I'll keep the issue open for us to be aware of the problem.

This issue also comes up with other partitions, like US Govcloud.

Ok yeah, the CLI doesn't support the "aws-cn" partition because it uses StackSets under the hood for project management which is not supported in China: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cloudformation-limits.html#stacksets-availability

We also have the AWS partition hard-coded in some parts of the CLI.
https://github.com/aws/amazon-ecs-cli-v2/blob/bb133e781cb03eb9e7dfd6ee9ea0bc2dd0725d26/internal/pkg/deploy/cloudformation/stack/project.go#L161-L162

I'll keep the issue open for us to be aware of the problem.

Hi @efekarakus , Stackset is now available in China region:
https://www.amazonaws.cn/en/new/2020/aws-cloudformation-stacksets-is-now-available-in-the-aws-china-regions/

Is it possible we could move on to fix the partition hard-coded issue ?
And as Code Pipeline is still not available in China region, but I guess we could just run copilot without pipeline?

Million thanks!

Oh awesome, thanks for letting us know! Yeah then I think that should unblock us at least for copilot deploy

Copilot now supports in China partition in our latest release https://github.com/aws/copilot-cli/releases/tag/v1.8.2 🎉

Was this page helpful?
0 / 5 - 0 ratings