I have deployed the default React App to test building a React container, pushing the image to ECR and deploying in ECS.
.circleci/config.yml
version: 2.1
orbs:
aws-ecr: circleci/aws-ecr@7.0.0
aws-ecs: circleci/aws-ecs@2.2.1
workflows:
build-and-push:
jobs:
- aws-ecr/build-and-push-image:
dockerfile: Dockerfile.prod
path: .
account-url: AWS_ECR_ACCOUNT_URL
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
region: AWS_DEFAULT_REGION
repo: "${AWS_RESOURCE_NAME_PREFIX}"
create-repo: false
tag: ${CIRCLE_SHA1}
- aws-ecs/deploy-service-update:
account-url: AWS_ECR_ACCOUNT_URL
aws-access-key-id: AWS_ACCESS_KEY_ID
aws-secret-access-key: AWS_SECRET_ACCESS_KEY
aws-region: AWS_DEFAULT_REGION
cluster-name: '${MY_APP_PREFIX}-cluster'
container-image-name-updates: 'container=${MY_APP_PREFIX}-service,tag=${CIRCLE_SHA1}'
family: '${MY_APP_PREFIX}-service'
requires:
- aws-ecr/build-and-push-image
context:
- test-docker-app
The step fails early with the following error:
aws: error: argument --task-definition: expected one argument
which I assume is this line in the step:
PREVIOUS_TASK_DEFINITION=$(aws ecs describe-task-definition --task-definition "$ECS_PARAM_FAMILY" --include TAGS)
Any clue why it is failing?