Integrate elasticbeanstalk with cognito user pool

Viewed 2964

I have a webpage in Elastic beanstalk for entering username and password. I want to link that to the cognito user pool for verifiation

I have deployed code in elastic bean stalk and able to launch the webpage Created a user pool in cognito. In elastic bean stalk iam getting the http address. But cognito requires https to be used as callback URL.

2 Answers

For this to work, the load balancer needs to be able to accept https connections and an authentication rule needs to be added to the load balancer rule.

Follow these steps:

  1. Provision https on the Load Balancer
  2. Add a Cognito Authentication Rule to your Load Balancer
  3. In DNS, point the public domain name to the ELB address

I'm usgin Amazon API Gateway for auth Cognito auth. And All request proxy by API Gateway to Elastic beanstalk application server.

To connect API Gateway and Elastic beanstalk

Elastic beanstalk's load balancer should be network load balancer, not application load balancer.

change elb type to --elb-type network from eb create

And change to Elastic beanstalk to private for security

remove --vpc.elbpublic from eb create

You Don't want using API gateway and you want just add ssl to Elastic beanstalk this video would be helpful.

Step 6: Deploying a Rails 5 app to Elastic Beanstalk - Configure custom domain and SSL

Related