AWS CLI Useful commands - Davz33/tutorials GitHub Wiki

S3

General

Set up new S3 bucket

aws s3 mb s3://mynews3bucket

Copy a file into a S3 bucket

aws s3 cp /etc/README.md s3://mynews3bucket

List all S3 buckets

aws s3 ls

List all files in S3 bucket

aws s3 ls s3://mynews3bucket

List all files in public S3 bucket

aws s3 ls --no-sign-request s3://publics3bucket/

copy between S3 buckets

Make sure you have the permission to access the "source" bucket first

aws s3 cp \
<s3://sourcebucketname/> \
<s3://targetbucketname/> \
--recursive \
--source-region <sourceregionname> \
--region <targetregionname>

note: source and target region is where your S3 buckets effectively live

Parquet

List meta-data (dimensional, column names and types, etc.)

You'll need python install and parquet-tools pip install parquet-tool then parquet-tools inspect <s3://...>

⚠️ **GitHub.com Fallback** ⚠️