aws-s3
High-level S3 file management commands
TLDR
List all buckets in your account
SYNOPSIS
aws s3 command [arguments] [options]
DESCRIPTION
aws s3 provides high-level commands for managing Amazon S3 buckets and objects. It offers a simplified interface for common S3 operations like copying, syncing, and listing files, abstracting away the complexity of the underlying S3 API.
The command uses two types of path arguments: LocalPath (absolute or relative path to local files) and S3Uri (S3 resource path in the form s3://bucket-name/key). Most commands accept a source as the first argument and an optional destination as the second.
For low-level S3 API access with full control over request parameters, use aws s3api instead.
PARAMETERS
--recursive
Apply command recursively to all files under a directory or S3 prefix--exclude pattern
Exclude files matching the pattern from the operation--include pattern
Include files matching the pattern (used with --exclude)--dryrun
Display operations that would be performed without executing them--acl value
Set the access control list (private, public-read, etc.)--storage-class value
Specify storage class (STANDARD, REDUCED_REDUNDANCY, GLACIER, etc.)
SUBCOMMANDS
cp
Copy files between local filesystem and S3, or between S3 locationsls
List S3 buckets or objects within a bucket/prefixmb
Make (create) a new S3 bucketmv
Move files between local filesystem and S3, or between S3 locationspresign
Generate a pre-signed URL for time-limited access to an S3 objectrb
Remove (delete) an S3 bucketrm
Remove (delete) S3 objectssync
Synchronize directories and S3 prefixes (uploads new/changed files)website
Configure S3 bucket website hosting settings
CAVEATS
The sync command only copies new or modified files by default; use --delete to remove files in the destination that don't exist in the source. Pattern matching with --exclude and --include is order-dependent; filters are applied in the order specified. The rb command fails on non-empty buckets unless --force is used.
HISTORY
Amazon S3 (Simple Storage Service) launched in March 2006 as one of AWS's first services. The aws s3 high-level CLI commands were introduced with AWS CLI version 1 in 2013 to simplify common operations that previously required multiple API calls through s3api. The sync command and multipart upload support have been enhanced over subsequent releases.
SEE ALSO
aws(1), aws-s3api(1), aws-s3-cp(1), aws-s3-sync(1)
