An single index.html file that - along with proper config - allows the visitor to browse through an S3 bucket
Note the URLs below and in the code are IP-restricted. And even if you did get access to them all you'd see is a thousand pictures of my sons : )
Had to:
-
Create new Identity Pool using Cognito allowing unauthenticated identities Make sure to check "Enable access to unauthenticated identities", but accept defaults otherwise
-
CORS Configuration
-
Bucket Policy { "Version": "2012-10-17", "Id": "S3PolicyId1", "Statement": [ { "Sid": "IPAllow", "Effect": "Allow", "Principal": "", "Action": "s3:", "Resource": "arn:aws:s3:::/*", "Condition": { "IpAddress": { "aws:SourceIp": "/24" } } } ] }
-
Grant "List" permissions to "Authenticated Users"