I created a jenkins job runing inside account A that connects using cross accounts IAM roles to account B, where we have a ECS cluster. I manageg to build and upload the docker images from account A jenkins to account B, but when I use:
aws ecs update-service --cluster arn:aws:ecs:eu-west-1:Account_B_ID:cluster/Cluster --service cluster-service --force-new-deployment --region eu-west-1
I was promted by an error:
An error occurred (InvalidParameterException) when calling the UpdateService operation: Identifier is for AccountID_B. Your accountId is AccountID_A
I have checked the Update-Service documentation, but i don't find any mistake and I cant found anything more regarding this issue anywhere.
Do you know where/how is the correct way of ECS cross account deployment?
Thanks for your time and help!