简体   繁体   中英

Restrict Access for FLASK Application deployed to AWS ElasticBeanStalk

I want to restrict access to view my Flask Webpage to only specified AWS users. Say I am doing a project for school, I follow the Aws Tutorial for deploying flask app , however once the app is published. Anyone can consume and post to the flask restful service.

I want to do the following

  • Lock it down so only logged specific IAM users can view and run the rest service.

I am aware and tried using SSH to lockdown the in/out bound traffic to a specific IP. however I want to only lock it down to specific IAM groups for now. so say when someone tries to go to my application, amazon redirects for them login.

the site is the following, I want to restrict access to only specific roles or groups http://XXXX-XXXX.us-east-1.elasticbeanstalk.com/

Thanks.

You could for example use AWS API Gateway in front of your app using IAM Authorization: https://aws.amazon.com/premiumsupport/knowledge-center/iam-authentication-api-gateway/

To configure the API Gateway to use IAM authorization from the console, go to the resources and click on your method. Then click on the Method Request and choose AWS_IAM in the Authorization dropdown: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM