Sub topic 1
Three Ways to Work with AWS
Prerequisites
Assume you know what an AWS account and cloud service are. You should be comfortable running shell commands and reading basic JSON. You also need an AWS sign-in with permission to view resources.
Three ways to work with AWS
AWS provides three common interfaces:
- The Management Console is a browser interface. It is useful for exploring resources and changing a small number of settings.
- The AWS CLI is a command-line tool. It is useful for repeatable commands, scripts, and precise output.
- CloudShell is a browser-based terminal. It includes the AWS CLI and uses your Console identity, so you can work without installing software locally.
Accounts, Regions, and identities
An AWS account is an isolated resource and billing boundary. A Region is a geographic area containing AWS infrastructure, such as us-east-1. Many resources belong to one Region, so a correct command in the wrong Region may appear to find nothing.
An identity is the user or role AWS evaluates for a request. Prefer IAM Identity Center or an assumed IAM role. Avoid using the root user for daily work. Verify the identity before making changes:
aws sts get-caller-identitySigning in to the Management Console
Open the AWS Console sign-in page and choose the sign-in method provided by your organization. After authentication, check the account name or account ID in the account menu. Then select the intended Region from the Region selector.
Finding your way around the Console
Use the service search field to find services such as Amazon S3 or Amazon EC2. Add frequently used services to Favorites. The account menu contains identity, account, and sign-out controls. If a resource is missing, first check the selected account, Region, and identity.
> Note > Console pages show only resources allowed by your permissions. A missing resource can indicate the wrong Region or insufficient access, not that the resource was deleted.
Installing AWS CLI v2
Use the installer for your operating system. This macOS example downloads and installs AWS CLI v2, then verifies the executable:
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o AWSCLIV2.pkg
sudo installer -pkg AWSCLIV2.pkg -target /
aws --versionOn Windows or Linux, use the corresponding AWS CLI v2 installer and run aws --version afterward.
Exercise
Which interface is best for repeating the same operation across many resources?
Show answer
The AWS CLI, because commands can be repeated or placed in a script.