aws s3 ls s3://bucketname/prefix1/prefix2/ | grep searchterm* | awk ‘{print $4}’
Continue readingCategory: How-To Guides
How to add Sort and Dist Keys to an existing Redshift table
Command to Add or Modify a Sort key: ALTER TABLE schema.table_name ALTER SORTKEY (column_name); Command to Add or Modify a
Continue readingHow to delete folder from an S3 bucket
Use the below command to delete folder named ‘prefix’ and all it’s contents from an S3 bucket aws s3 rm
Continue readingHow to keep the folder and delete all contents of an S3 bucket prefix
Use the below command to delete all the contents of an S3 bucket folder and not the folder itself. aws
Continue readingHow to Rename an S3 bucket
AWS does not support renaming an S3 bucket. If you’ve created a bucket with the incorrect name and would like
Continue readingHow to copy contents from one S3 bucket to another
Copy file from one bucket to another within the same region where bucketname1 is the source bucket and bucketname2 is
Continue readingHow to view the region of an S3 bucket
Use the below command to identify the region of an S3 bucket where bucketname is the name of the bucket.
Continue readingHow to download an entire S3 bucket
Download all the contents of an S3 bucket to your local current directory using below commands: aws s3 sync s3://bucketname
Continue readingHow to kill sessions in Redshift
Identify the session that you would like to terminate from the below view and copy the process id. SELECT *
Continue readingHow to determine the size of an S3 bucket
aws s3 ls s3://bucketName/ –recursive –summarize | grep “Total Size:” aws s3 ls s3://bucketName/prefix/ –recursive –summarize | grep “Total Size:”
Continue reading