Simple AWS S3 photo gallery with a Python lambda function to generate thumbnail
Edit the terraform/terraform.tfvars.example
and remove the .example
suffix.
./lambda/package.sh
A zip file lambda/lambda.zip
will be created. Terraform will upload it to AWS.
export AWS_DEFAULT_REGION="eu-west-3"
cd terraform
terraform init # only the first time
terraform plan
terraform apply
- The S3 bucket should be public (
⚠️ Terraform apply aAllowPublicRead
policy on the bucket) - Photo filename should have
.jpg
suffix - Photo filename should not contains space
- Photo filename should not begin with the thumbnail prefix (thumb_)