Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure / use AWS CLI in GitHub Actions?

I'd like to run commands like aws amplify start-job in GitHub Actions. I understand the AWS CLI is pre-installed but I'm not sure how to configure it.

In particular, I'm not sure how the env vars are named for all configuration options as some docs only mention AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY but nothing for the region and output settings.

like image 958
thisismydesign Avatar asked Aug 07 '26 22:08

thisismydesign


1 Answers

I recommend using this AWS action for setting all the AWS region and credentials environment variables in the GitHub Actions environment. It doesn't set the output env vars so you still need to do that, but it has nice features around making sure that credential env vars are masked in the output as secrets, supports assuming a role, and provides your account ID if you need it in other actions.

https://github.com/marketplace/actions/configure-aws-credentials-action-for-github-actions

like image 161
Clare Liguori Avatar answered Aug 09 '26 11:08

Clare Liguori



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!