Important AWS commands
1. Configure named profile with the credentials
aws configure --profile <profile-name>
2. Copy local file to S3 bucket using named profile
aws s3 cp temp.xml.gz s3://<bucket-name>/<folder-name>/ --profile <profile-name>
3. Download s3 file using named profile
aws s3 cp s3://<s3-path> . --recursive --profile <profile-name>
4. Upload all files to s3 using wildcard
aws s3 cp temp/ s3://<s3-path> --profile <profile-name> --recursive --exclude "*" --include "IND_08*"
5. List all credentials of the configured AWS profiles
cat ~/.aws/credentials
6. Change default AWS credentials
aws configure
6. List the named profiles
cat ~/.aws/config | grep "\[profile " | sed -e 's/\[//g' -e 's/\]//g' -e 's/profile //g'
Comments
Post a Comment