Chapter 6.3 - AWS Command Line Flashcards
What is the AWS Command Line?
The AWS Command Line is the CLI (command line interface) for Amazon Linux.
What distributions of Linux is Amazon Linux based upon?
Amazon Linux 1 & 2 = Combination of Red Hat & Fedora
Amazon Linux 2022 = Fedora with SELinux
AL2022 will have SELinux enabled and enforced by default.
What are some fundamental Amazon Linux commands?
aws configure
Configure the CLI to interact with AWS
ls = list
Example: aws s3 ls
cd = change directory
Example: cd Downloads
chmod 400 filename = change the file’s permissions
Example: chmod 400 MyNVKP.pem
mb = make bucket
Example: aws s3 mb s3://bucketname
What is the basic formatting of Amazon Linux commands?
Format:
aws servicename command
Example:
aws s3 ls
This command would list all the buckets in S3 in an account.
AWS Command Line / Linux Best Practices & Compatibility
The Principle of Least Privilege
Always give your users the minimum amount of access required to do their job.
Use Groups
Create IAM groups and assign your users to groups.
Secret Access Key
You will only see this once! If you lose it, you can delete the access key and secret key and regenerate them. You will need to run the aws configure again.
Don’t Share Key Pairs
Each developer should have their own access key ID and secret access key. Just like passwords, they should not be shared.
Supports Linux, Windows, MacOS
You can install the CLI on your Mac, Linux or Windows PC. You can also use it on EC2 instances.