aws-ecs-deploy:1.6.1 - "There are no active task definitions for the service x on the cluster y..."
Asked by Jason Ryan:

Hello,

Having issues getting aws-ecs-deploy working with my cluster created by a cloudFormation template as part of docker compose's ECS integration.

I am positive my AWS keys are working (I've tried running with bogus info and it fails differently), however I am also sure that my cluster name and service name are spelled correctly as well. This was confirmed by running the AWS CLI command:

```
aws ecs describe-services --services x --cluster y
```

Which returns a nice long JSON dump and I clearly see the ARN of my taskDefinition listed.

Here's my bitbucket-pipelines.yml:  

```
# This is an example Starter pipeline configuration

# Use a skeleton to build, test and deploy using manual and parallel steps

# -----

# You can specify a custom docker image from Docker Hub as your build environment.

image: atlassian/default-image:2

pipelines:

  default:

    - parallel:

      - step:

          name: 'Build and Test'

          script:

            - echo "Your build and test goes here..."

      - step:

          name: 'Lint'

          script:

            - echo "Your linting goes here..."

      - step:

          name: 'Security scan'

          script:

            - echo "Your security scan goes here..."

    # The following deployment steps will be executed for each pipeline run. To configure your steps and conditionally deploy see https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/

    - step:

        name: 'Deployment to Staging'

        deployment: staging

        script:

          - pipe: atlassian/aws-ecs-deploy:1.6.1

            variables:

              AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

              AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY

              AWS_DEFAULT_REGION: 'us-east-2'

              CLUSTER_NAME: 'y'

              SERVICE_NAME: 'x'

              FORCE_NEW_DEPLOYMENT: 'true'
```

Here's the error output after building: (FYI I found a typo - defifnitions)

    INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

    INFO: Check for active task definition...

    INFO: Found credentials in environment variables.

    ? There are no active tasks defifnitions for the service x on the cluster y. Check your service on the AWS Console or provide the TASK_DEFINITION variable.

What gives?

PS: I am unsure what to put for the image, because I'm expecting my task definition to define which image to use from ECR when this is working correctly.


Answers:
author: Kriss Hiler
body: And what I know is that there are a lot of people now who want to use a detailed financial system, I know you want to find one and I know where you can find one for yourself. Exactly, I can recommend you to go to this site [Tokonomo Academy\`s one-stop guide to decentralized finance](https://academy.tokonomo.com/) now, only here you can find the coolest decentralized system that exists. Get all the information not, find out what banks use and why you should use them, in general this is very relevant information that you should be actively studying right now.


author: Jason Ryan
body: Found the solution on this. My AWS credentials were wrong.

comments: author: kwinten.hardies
body: Hi Jason, What credentials are needed for this? I have exactly the same issue. Thank you.


Tags: bitbucket-pipelines

cloud