I have a CF template and ECR image referenced in this template
Image: !Sub <registry_id>.dkr.ecr.eu-central-1.amazonaws.com/<repo_name>:${AWS::StackName}
If I update an image and then run
sam deploy --template-file devops/templates/${CFFILENAME}.yml \
--capabilities CAPABILITY_NAMED_IAM --stack-name "${STACK_NAME}" \
--region ${AWS_DEFAULT_REGION} --no-fail-on-empty-changeset
It won't detect any changes and I have to run
aws ecs update-service --cluster Env-${STACK_NAME}-ClusterALB --service Env-Backend --force-new-deployment
To update ECS task later in the pipeline, but it is causing stack drift. I would like to avoid it and do it all in one step in my CI pipeline and only using CF. Is there any pretty way to do it?