Amazon cli image doesn’t work with Gitlab CI


I’m trying to run the aws command (to invalidate cloudfront) using official aws image and have the following config of .gitlab-ci.yml:

The job fails with the following error:

Any ideas why it’s not working?
When I run the command locally it works.


amazon/aws-cli docker has set entrypoint to aws as it’s expected to be executed as

but gitlab expects entry point to shell so it can then execute script commands.

Check out gitlab documentation:

You will find there how to override docker image entrypoint.

Working config is:

Leave a Reply