Skip to content

Failed to create a new environment if it's the first time to create an ECS cluster in an AWS account #1324

@toricls

Description

@toricls

Reproduce:

  • Create a new AWS account
  • Use that account for copilot init
  • 'Yes' for deploying test env (or copilot env init after 'No' for it)

Then the CFn stack for new env is going to fail due to an error something like:

Invalid request provided: CreateCluster Invalid Request: Unable to assume the service linked role. Please verify that the ECS service linked role exists. (Service: Ecs, Status Code: 400, Request ID: a973c2ca-204c-4715-9e2e-6097da7eb8c1, Extended Request ID: null)

Here is the CLI output:

~ snip ~
All right, you're all set for local development.
Deploy: Yes

✘ Failed to create the infrastructure for the test environment.
- Virtual private cloud on 2 availability zones to hold your services                       [Failed]
- Virtual private cloud on 2 availability zones to hold your services                       [Failed]
  Resource creation cancelled
  - Internet gateway to connect the network to the internet                                 [Failed]
  Resource creation cancelled                                                                        ess]
  - Public subnets for internet facing services                                             [In Progress]
  - Private subnets for services that can't be reached from the internet                    [In Progress]
  - Routing tables for services to talk with each other                                     [In Progress]
- ECS Cluster to hold your services                                                         [Failed]
  Invalid request provided: CreateCluster Invalid Request: Unable to assume the service linked role  ess]
- Application load balancer to distribute traffic                                           [In Progress]
✘ wait until stack prod-ready-copilot-test create is complete: ResourceNotReady: failed waiting for successful resource state

$ copilot --version
copilot version: v0.3.0

I think we need some documentation and/or nice CLI output to let users solve - removing the existing failed stack and copilot env init again - this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/envIssues about environments.type/bugIssues that are bugs.type/requestIssues that are created by customers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions