AWS CCP Notes

Search

Search IconIcon to open search

05-03 Access Keys

Last updated Aug 17, 2023 Edit Source

Access Keys (aka AWS Credentials) is a key and secret required to have programmatic access to AWS resources when interacting with the AWS API outside of the AWS Management Console.

Note

A user must be granted access to use Access Keys

# Important Notes:

Access Keys are to be store in ~/.aws/credentials and follow a TOML file format

1
2
3
4
5
6
7
[default]
aws_access_key_id=AKIAIOSFODNNTEXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
[exampro]
aws_access_key_id=AKIAIOSFODNN7EXAMPLE
aws_secret_access_key=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region=ca-central-i
1
2
3
4
5
$ aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Kev [Nonel: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json
1
2
3
$ export AWS ACCESS KEY ID=AKIAIOSFODNNTEXAMPLE
$ export AWS SECRET ACCESS KEY=wJalrxUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ export AWS DEFAULT REGION=us-west-2