AWS CLI Samples
We have collected and published specific examples of AWS CLI.
We also collect items that are not general purpose but have special uses.
We mainly check whether commands can be executed using AWS Cloud9.
You can also make a suggestion using the form below.
We will continue to include command examples as they are proposed, so please feel free to suggest them.
Please also provide corrections if the command examples have mistake.
- Get the latest AMI ID for Amazon Linux 2.
- Get the latest AMI ID for Amazon Linux 2023.
- Create a security group
- [Security Group] Create a rule to allow HTTP from any source
- [Security Group] Create an allow all rule from your public IP address
- Launch an EC2 instance with the latest Amazon Linux 2023 AMI
- Delete an EC2 instance
- Delete a security group
- See all EC2 instances
- See all Windows EC2 instances
- See all Linux EC2 instances
- Allocation of Elastic IP addresses determined to be in Japan (JP) by RIR (100 attempts)
- Find unused customer-managed IAM policy ARNs
- Delete unused customer-managed IAM policy versions (miscellaneous)
- Delete unused customer-managed IAM policies
- List S3 buckets
- Show contents of S3 bucket
- Delete S3 bucket if empty
- Delete S3 bucket even if not empty
- Delete S3 bucket with name that has a specific string
- Download objects in a specific folder in an S3 bucket locally (./) in bulk
- Download only objects of a specific file format (.csv) in a specific folder in an S3 bucket locally (./) in bulk
- Create an EC2 development environment
- Add environment members to your development environment
- Remove environment members from the development environment
- Delete the development environment
- Import a self-signed certificate into ACM
- Request a certificate from a private CA
- Request a public certificate
- List certificates
- View certificate details
- Delete a certificate
- Create a root CA and a subordinate CA in different AWS accounts
- Import a private certificate with an expiration date of 1 month (less than 13 months) into ACM
- List times and users who attempted to launch EC2 in the last 90 days
- List times and users for which EC2 failed to start in the last 90 days
- List the times, instance IDs, and users who launched EC2 in the past 90 days
- List times and actions and users who interacted with a specific route table in the last 3 days
- Create a log group
- Create a log stream
- Output log events
- Check log events
- Set retention period in bulk for log groups with matching prefixes
- Determine the language of the text
- Determine the language of the text and translate it to English
- Determine the language of the text and analyze the syntax
- Create a private virtual interface
- Create a transit virtual interface
- Create a public virtual interface
- Display the status of a Direct Connect connection every second
- Display virtual interface status every second
Suggest