SanderKnape / aws-cognito-app

A sample application that uses the AWS PHP SDK to implement AWS Cognito functionality
https://sanderknape.com/2017/02/getting-started-with-aws-cognito/
94 stars 39 forks source link

all setup done, getting curl error. #6

Open prasannahbshetty opened 4 years ago

prasannahbshetty commented 4 years ago

Done settings as per guidelines, while trying to signup/ login getting below error. " Error retrieving credentials from the instance profile metadata server. (cURL error 7: Failed to connect to 169.254.169.254 port 80: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html))"

matiya commented 4 years ago

I had the same "issue" (it is actually an oversight).

You need to give your EC2 instance a cognito role, as detailed in step 8.

This will create the URL http://169.254.169.254/latest/meta-data/iam/security-credentials/.