Takes input images from S3 and resizes them to the desired size (by width, within a range).
- Upload zip to lambda
- Configure S3 buckets on lambda, input and output.
- Configure api gateway to allow GET requests passing through "url".
- Configure output bucket with s3 static hosting and use redirect.xml to redirect to lambda.
- Add bucket policy for public access.
{
"Version": "2008-10-17",
"Id": "Policy1397632521960",
"Statement": [
{
"Sid": "Public Access",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::output-bucket-name/*"
}
]
}
Optional for HTTPS
- Add cloudfront distributuon using the S3 website url (not the direct url)
- Add appropriate DNS and Amazon cert