I have an ECS cluster & service that use CodeDeploy. However, I get this error when I use this pipe:
Failed to update the stack.
An error occurred (InvalidParameterException) when calling the UpdateService operation: Unable to update task definition on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment.
Thank you for your question!
We'll investigate this case and notify you.
It'd be nice if you provide us with more details about your pipelines configuration and logs.
Best regards,
Oleksandr Kyrdan
Hello @Oleksandr Kyrdan ,
I ended up using atlassian/aws-code-deploy:1.1.0 for my ECS code deployment. Within the AWS ECS service, I'm using CodeDeploy:
With atlassian/aws-code-deploy:1.1.0, I had to upload my task definition outside of the pipe & the BUNDLE_TYPE had to be set to YAML.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am facing the same issue @Monica Gordillo how does your pipeline look like? Can you please share?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what I ended up using in my step:
- echo "Uploading task definition"
- aws ecs register-task-definition --family $ECS_TASK_FAMILY_NAME --region="$AWS_DEFAULT_REGION" --cli-input-json file:///opt/atlassian/pipelines/agent/build/task-definition.json
- pipe: atlassian/aws-code-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_DEPLOY
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_DEPLOY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
COMMAND: 'upload'
APPLICATION_NAME: "$CODEDEPLOY_APP_NAME"
DEPLOYMENT_GROUP: "$CODEDEPLOY_DG_NAME"
S3_BUCKET: "$CODEDEPLOY_S3_BUCKET_NAME"
FOLDER: "${S3_BUCKET_FOLDER}/${ENV_FULL_TYPE}"
BUNDLE_TYPE: 'YAML'
ZIP_FILE: 'appspec.yml'
VERSION_LABEL: 'appspec.yml'
- pipe: atlassian/aws-code-deploy:1.1.0
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID # Optional if already defined in the context.
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY # Optional if already defined in the context.
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION # Optional if already defined in the context.
COMMAND: 'deploy' # 'upload' or 'deploy'.
APPLICATION_NAME: "$CODEDEPLOY_APP_NAME"
DEPLOYMENT_GROUP: "$CODEDEPLOY_DG_NAME"
S3_BUCKET: "$CODEDEPLOY_S3_BUCKET_NAME"
FOLDER: "${S3_BUCKET_FOLDER}/${ENV_FULL_TYPE}"
BUNDLE_TYPE: 'YAML'
VERSION_LABEL: 'appspec.yml'
DEBUG: 'true'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.