In this workshop, you will learn about AWS CLI and use it to interact with AWS services.
ℹ️ Information: AWS Command Line Interface (AWS CLI) is an open-source tool that allows you to interact with AWS services using commands in your command-line shell. With a simple setup process, AWS CLI allows you to run commands that implement functions equivalent to those provided by the AWS Management Console in your browser.
ℹ️ Information: AWS CLI supports the following command-line environments:
💡 Pro Tip: All administrative, management, and access functions for AWS resources in the AWS Management Console are available in the AWS API and CLI. New AWS features and services will be fully provided like on the AWS Management Console through API and CLI immediately after launch or within 180 days thereafter.
ℹ️ Information: AWS CLI provides direct access to the public APIs of AWS services. You can explore the capabilities of an AWS service with AWS CLI and develop shell scripts to manage your resources. In addition to low-level commands equivalent to APIs, many AWS services allow customizations on AWS CLI. Customizations can include higher-level commands that simplify using services with complex APIs.
ℹ️ Information:
default profile. Additionally, you can create multiple other profiles called named profiles with the --profile parameter.config and credentials files. You can create additional profiles by adding settings directly to these files.💡 Pro Tip: With the --profile parameter, you can specify a specific profile to execute commands in AWS CLI. You can also specify a profile in the AWS_PROFILE environment variable to replace the default profile in a specific session.
ℹ️ Information: We will use the aws configure command. This is considered the fastest way to set up AWS CLI. The command line will prompt for 4 pieces of information as follows:
🔒 Security Note: Access keys include access key ID and secret access key, used to sign application requests you send to AWS. Always protect this information and never share it. Use IAM roles when possible instead of access keys.
ℹ️ Information: Default region name specifies the AWS Region with servers where you want to send your requests by default. For example: you can enter us-west-2 to use US West (Oregon). This is the default Region that all subsequent requests will be sent to, unless you specify otherwise.
⚠️ Warning: Region selection affects cost, latency, and service availability. Choose a Region close to your end users to reduce latency.
ℹ️ Information: Default output format specifies how returned results are formatted. If you don’t specify an output format, json is used by default.
+|- characters to form cell borders.💡 Pro Tip: The table format is very useful when you want to view results visually, while json or yaml formats are suitable when you need to process data with other tools.