AWS CLI: Difference between revisions
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
aws -- | cat << INI | tee -a ${HOME}/.aws/config >/dev/null | ||
[default] | |||
region = ap-southeast-1 | |||
output = table | |||
INI | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| valign="top"| | | valign="top" | | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cat | cat << INI | tee -a ${HOME}/.aws/credentials >/dev/null | ||
[academia] | |||
aws_access_key_id = AKIBVWTF7RISAULV8Q6Q | |||
aws_secret_access_key = w2JVkDIE9zRTIP/S4m7Mm4cWKlFEYlzg1iGzfCnj | |||
INI | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| valign="top"| | | valign="top" | | ||
<syntaxhighlight lang="bash"> | |||
cat << INI | tee -a ${HOME}/.aws/config >/dev/null | |||
[profile academia] | |||
region = ap-southeast-1 | |||
output = json | |||
INI | |||
</syntaxhighlight> | |||
|- | |- | ||
Line 28: | Line 44: | ||
|- | |- | ||
| valign="top" | | | valign="top" | | ||
<syntaxhighlight lang="bash"> | |||
export AWS_DEFAULT_PROFILE=academia | |||
export AWS_PROFILE=academia | |||
aws ec2 describe-vpcs | |||
aws s3 ls | |||
</syntaxhighlight> | |||
| valign="top" | | | valign="top" | | ||
aws configure --profile academia | |||
aws configure help | |||
aws configure list | |||
aws configure | |||
| valign="top" | | | valign="top" | | ||
cat ~/.aws/credentials | |||
cat ~/.aws/config | |||
|} | |} |
Revision as of 04:55, 18 July 2024
wget -cq https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -P ${HOME}/Downloads
unzip -q ${HOME}/Downloads/awscli-exe-linux-x86_64.zip -d ${HOME}/Downloads/
rm -rf ${HOME}/Downloads/awscli-exe-linux-x86_64.zip
sudo ${HOME}/Downloads/aws/install
rm -rf ${HOME}/Downloads/aws
Playground
cat << INI | tee -a ${HOME}/.aws/config >/dev/null
[default]
region = ap-southeast-1
output = table
INI
|
cat << INI | tee -a ${HOME}/.aws/credentials >/dev/null
[academia]
aws_access_key_id = AKIBVWTF7RISAULV8Q6Q
aws_secret_access_key = w2JVkDIE9zRTIP/S4m7Mm4cWKlFEYlzg1iGzfCnj
INI
|
cat << INI | tee -a ${HOME}/.aws/config >/dev/null
[profile academia]
region = ap-southeast-1
output = json
INI
|
| ||
export AWS_DEFAULT_PROFILE=academia
export AWS_PROFILE=academia
aws ec2 describe-vpcs
aws s3 ls
|
aws configure --profile academia aws configure help aws configure list aws configure |
cat ~/.aws/credentials cat ~/.aws/config |
References
| ||