AWS S3 and CLI Command Cheat Sheet
Jun 08, 2023 • 4 Minute Read
AWS Simple Storage Service may be one of the easier AWS products to use out of the box, but that doesn't mean we don't sometimes need a quick reference for the command line. Especially if you're new to AWS CLI (Command Line Interface) or need to memorize some S3 feature before the big CSA exam, you need some references. This is why, for the first AWS-themed cheat sheet, we are focusing on S3.Click on the image below to get the full size and start learning!
AWS CLI Commands
- Install CLI: pip install awscli
- Configure CLI: aws congifure
- List Buckets: aws s3 ls
- List Bucket Content: aws s3 ls s3://<bucket>
- Make Bucket: aws s3 mb s3://<bucket>
- Remove Empty Bucket: aws s3 rb s3://<bucket>
- Sync Objects: aws s3 sync <local> s3://bucket
- Copy to Bucket: aws s3 <object> s3://<bucket>
- Copy from Bucket: aws s3 cp s3://<bucket>/<object> <destination>
- Move Object: aws s3 mv s3://<bucket>/<object> <destination>
- Remove Object: aws s3 rm s3://<bucket>/<object>
- Sync Objects Between Buckets or Directories: aws s3 sync <local> s3://<bucket>
AWS S3 Storage Services
S3 Standard
S3 Standard gives excessive durability, availability, and overall performance item storage for regularly accessed records. Because it offers low latency and high throughput, S3 Standard is suitable for an extensive number of use cases, such as cloud applications, dynamic websites, content distribution, mobile and gaming applications, and large data analytics.
S3 Intelligent-Tiering
Amazon S3 Intelligent-Tiering (S3 Intelligent-Tiering) is the only cloud storage class that delivers automatic cost savings by moving objects between four access tiers once access patterns change. The S3 Intelligent-Tiering storage class is intended to optimize spend by automatically moving information to the most cost-efficient access tier, without operational overhead. It works by storing objects in four access tiers: 2 low latency access tiers optimized for frequent and occasional access, and two optional archive access tiers designed for asynchronous access that are optimized for rare access.
S3 Standard-IA
S3 Standard-IA is for data that is accessed much less frequently, however requires fast access whilst needed. S3 Standard-IA gives the high durability, high throughput, and low latency of S3 Standard, with a low per GB storage cost and in line with GB retrieval fee. This mixture of low cost and high overall performance makes S3 Standard-IA perfect for long-period storage, backups, and as a data store for disaster recovery files.
S3 One Zone-IA
S3 One Zone-IA is intended for data that is accessed less frequently, but that needs to be accessed quickly when needed. In contrast to other S3 storage classes, in which data is stored in at least three availability zones (AZ), S3 One Zone-IA stores data in a single AZ and costs 20% less than S3 Standard-IA. S3 One Zone-IA is ideal for customers who want a lower cost option for infrequent access data, but don't need the availability and resilience of S3 Standard or S3 Standard-IA. A good choice for storing secondary backups of local data or data to be simply recreated.
S3 Glacier
S3 Glacier is an affordable, durable and secure class of storage for archiving data. You can reliably store any amount of data at a competitive or lower cost than on-premise solutions. To keep costs down, but to suit different needs, S3 Glacier offers three recovery options from a few minutes to hours: you can upload objects directly to S3 Glacier or transfer data between one of the S3 active data storage classes using S3 lifecycle policies.
S3 Glacier Deep Archive
S3 Glacier Deep Archive is the most affordable storage class in Amazon S3 and supports long-term retention and digital retention of data that can be accessed once or twice a year. It is aimed at customers, especially in highly regulated industries like financial services, healthcare, and the public sector, who keep records for 7 to 10 years or more to meet regulatory compliance requirements. S3 Glacier Deep Archive can also be used for backup and disaster recovery use cases and is a cost-effective and easy-to-manage alternative to magnetic tape systems, whether it is local libraries or external services.
S3 Outposts
Amazon S3 on Outposts provides object storage in your on-premises AWS Outposts environment. Using S3 APIs and features available in AWS Regions today, S3 on Outposts makes it easy to store and retrieve data in your Outpost, as well as protecting your data. Control access, mark it and report it. S3 on Outposts offers a single Amazon S3 storage class called S3 Outposts that uses the S3 APIs and permanently and redundantly stores data on multiple devices and servers at their outposts.