javascript - Best approach to grant web access to s3 directory -


i'm attempting build cms using s3 bucket website. have bucket policy allows public/anonymous access /_admin directory. gain backend access want user able provide username/password change bucket policy allow /_admin access based on users ip address.

what best way accomplish this?

*i'm thinking of using api gateway call lambda function checks username/password , changes policy. successful result redirect backend.

the best way accomplish aws best practices create iam role have permissions access /_admin directory. using amazon cognito in aws sdk language of choice can retrieve temporary credentials based on role. can use aws sdk calls or can adjust s3 bucket permissions access resource.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -