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

ECS Service Creation Stuck Due to No Available Container Instances #181

Open
3 tasks done
loftwah opened this issue Jul 23, 2024 · 0 comments
Open
3 tasks done

ECS Service Creation Stuck Due to No Available Container Instances #181

loftwah opened this issue Jul 23, 2024 · 0 comments
Labels

Comments

@loftwah
Copy link

loftwah commented Jul 23, 2024

Checklist

  • Upgrade UFO: I am using the latest version of UFO.
  • Reproducibility: This is a reproducible bug.
  • Code sample: Included below.

My Environment

Software Version
Operating System macOS / WSL (Windows)
UFO Latest
Ruby 3.3.0, 3.2.2

Expected Behaviour

The ufo ship command should deploy the ECS service without any issues, creating the necessary ECS cluster and running the tasks as expected.

Current Behavior

The ufo ship command gets stuck at the ECS service creation step, displaying the error message:

CREATE_IN_PROGRESS AWS::ECS::Service EcsService Eventual consistency check initiated

The error in AWS reads:

service demo-web-dev-EcsService-QY7NEm2trctk was unable to place a task because no container instance met all of its requirements. Reason: No Container Instances were found in your cluster. For more information, see the Troubleshooting section of the Amazon ECS Developer Guide.

Step-by-step reproduction instructions

  1. Install UFO:

    gem install ufo
  2. Set up AWS config and credentials:

    # ~/.aws/config
    [dev]
    region = us-west-1
    output = json
    
    # ~/.aws/credentials
    [dev]
    aws_access_key_id=REPLACE_ME
    aws_secret_access_key=REPLACE_ME
  3. Set AWS_PROFILE and verify credentials:

    export AWS_PROFILE=dev
    aws sts get-caller-identity
    aws s3 ls
  4. Create ECS cluster named dev in the us-west-1 region:

    aws ecs describe-clusters --clusters dev --region us-west-1 --profile dev
  5. Set up the demo project:

    mkdir demo && cd demo
    aws ecr create-repository --repository-name demo
    REPO=$(aws ecr describe-repositories --region us-west-1 --profile dev --repository-name demo | jq -r '.repositories[].repositoryUri')
    echo $REPO
    AWS_PROFILE=dev ufo init --app demo --repo $REPO
  6. Ship the code:

    AWS_PROFILE=dev ufo ship -y
  7. Observe the error:

    CREATE_IN_PROGRESS AWS::ECS::Service EcsService Eventual consistency check initiated

Code Sample

Here is the relevant code and configurations used during the process:

Solution Suggestion

Unsure. This prevented me from getting going with UFO.

@loftwah loftwah added the bug label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant