How to Deploy to AWS Elastic Container Service and Fargate

I’m using GitLab CI to deploy an application to the new Fargate-type tasks in Elastic Container Service in Amazon Web Services. It involves some work using the AWS CLI and updating task definitions/services in AWS in a deploy script.

Full explanation here: https://webcaptioner.com/blog/2017/12/deploy-from-gitlab-to-aws-fargate/

1 Like

Thanks for the blog, it has really helped get me started. However I’m trouble with the deploy script though. It gives me

An error occurred (InvalidSignatureException) when calling the GetAuthorizationToken operation: The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.

Even if I use an AWS root user access token which works fine in Ubuntu (where I had installed awscli with apt-get). Any idea what the cause is. Maybe aws has gone over to python3 perhaps?

Hi @andrewpate , I ran into similar issues. It works just fine with python 2 and this has likely to do with incorrect configuration. Things like trailing spaces or characters other than alphanumeric ones in the passkey (or region). (see also this stack overflow question for more suggestions)

I have yet to confirm it, but it might also have to do with the K8S_SECRET_-prefix in case you’re using it.