Direct upload image to S3 with SAM

1. Configure the AWS CLI

1
aws configure

2. Install AWS SAM CLI

1
2
HOMEBREW_NO_AUTO_UPDATE=1 brew tap aws/tap
HOMEBREW_NO_AUTO_UPDATE=1 brew install aws-sam-cli

3. Set up the AWS SAM example

1
2
3
4
git clone https://github.com/aws-samples/amazon-s3-presigned-urls-aws-sam
cd amazon-s3-presigned-urls-aws-sam
sam build
sam deploy --guided

4. Upload images

Upload to Amazon S3 directly from a web or mobile application