Reputation:
I have a Flask API that I am serving with Gunicorn on an EC2 instance, I am trying to use AWS API Gateway to connect my endpoints but I get an error when trying to use the ip of my EC2 instance for the endpoint url.
My endpoint looks like this ec2-x-x-xxx-xx.eu-west-.compute.amazonaws.com:8080/scraper/run
Upvotes: 0
Views: 1464
Reputation: 197
You should consider 2 options:
If your EC2 is publicly available you should have an inbound rule 0.0.0.0/0 on it. If not I think your should consider option 2.
Look at this blog post to configure your VPC Endpoint and then restrict and secure your communication : https://aws.amazon.com/fr/blogs/compute/introducing-amazon-api-gateway-private-endpoints/
Upvotes: 1