in this repository, we work with infrastructure as code on a kubernetes cluster on AWS, we use two methods: terraform and cloudformation.
Terraform is a standard language to work with infrastructure as code and standardize everything, although we will use our own modules to interact with AWS.
CloudFormation on the other hand is proprietary to AWS and allows us to build infrastructure by applying different stacks within AWS.
- Install AWS CLI
Generate Security Credentials using AWS Management Console Go to Services -> IAM -> Users -> "Your-Admin-User" -> Security Credentials -> Create Access Key Configure AWS credentials using SSH Terminal on your local desktop
aws configure
AWS Access Key ID: ...
AWS Secret Access Key: ...
Default region name: us-east-1
Default output format: json
# Working with different account on aws cli
aws configure --profile jg1938112
Los archivos deberían verse algo así:
~/.aws/config:
[profile cuenta1]
region = us-west-2
[profile cuenta2]
region = us-east-1
~/.aws/credentials:
[cuenta1] aws_access_key_id = <clave_de_acceso_1> aws_secret_access_key = <clave_secreta_1> [cuenta2] aws_access_key_id = <clave_de_acceso_2> aws_secret_access_key = <clave_secreta_2>
test: aws s3 ls --profile jg1938112
aws --version
aws s3 ls
Verify the AWS Credentials Profile
cat ~/.aws/credentials