Additional High-Level S3 Commands
Explore high-level AWS S3 commands such as listing buckets and objects, deleting buckets with caution, and syncing data between local and S3 storage. This lesson equips you with practical CLI skills to manage and organize S3 resources efficiently.
We'll cover the following...
We'll cover the following...
List buckets and objects
To list buckets and objects, we use the ls subcommand.
Syntax:
aws s3 ls <target> [--options]
Example 1:
This example lists all existing S3 buckets with their creation date and timestamp.
aws s3 ls
Example 2:
This example lists all objects and prefixes inside the my-pets bucket.
aws s3 ls s3://my-pets
Example 3:
This example lists all objects present inside the dogs prefix in my-pets bucket.
aws s3 ls s3://my-pets/dogs/
...