An AWS CLI tutorial that demonstrates S3 operations.
bash s3-cors.shTo auto-run with cleanup:
echo 'y' | bash s3-cors.sh- Creating bucket"; aws s3api create-bucket --bucket "$B
- Setting CORS"; aws s3api put-bucket-cors --bucket "$B" --cors-configuration '{"CORSRules":[{"AllowedOrigins":["https://example.com"],"AllowedMethods":["GET","PUT"],"AllowedHeaders":["*"],"MaxAgeSeconds
- Getting CORS"; aws s3api get-bucket-cors --bucket "$B
- Bucket
- Bucket Cors
The script prompts you to clean up resources when it finishes.
Free tier eligible for most operations. Clean up resources after use to avoid charges.