Skip to content
Advertisement

Bash script to install AWS CLI tools

I am writing a bash script that will automatically install and configure AWS CLI tools. I am able to install AWS CLI tools but unable to configure it.

My script is something like this:

JavaScript

I wish to do the configuration using this script too. I wish that I can provide these credentials via script so that it prevents manual entry. How can this be done?

Advertisement

Answer

Use a configuration file rather than the aws configure command. Create a file called ~/.aws/config that looks like this:

JavaScript

More info in the docs.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement