AWS CLI - S3 API Recap

0
CLI Command to list objects based on key filter

aws s3api list-objects --bucket dataos-customer-surveys  --query "Contents[?contains(Key, `input`)]"
 
Command to list object key based on Prefix 
aws s3api list-objects --bucket dataos-customer-surveys  --prefix Archive/ --query "Contents[].{Key: Key}"

  Command to list object key and size 
aws s3api list-objects --bucket dataos-medallia-surveys-prod --query "Contents[].{Key: Key, Size: Size}"

Copying the Local file to S3 

aws s3 cp D:/Users/AnwarBA/Desktop/HPS_DigtalApp_Responses_EDL_Exp_20221028.txt s3://dataos-medallia-surveys-prod