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)
<span>INFO: Check for active task definition...</span>
<span>INFO: Found credentials in environment variables.</span>
<span>✖ 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.</span>
<span>INFO: Using default authentication with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.</span>
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.