I deployed a lambda to AWS and created an api gateway to access it. I don't want the API gateway to be public because the lambda is only called from one of my ec2 instance. What is the best way to configure it to secure this API? My ec2 instance needs public IP address since I have DNS configure route pointing to it.
Since you are only using the AWS Lambda function from a single Amazon EC2 instance, there is no need to use API Gateway. (API Gateway is normally used to expose an API to a large number of users.)
You can instead invoke an AWS Lambda function directly:
aws lambda invoke
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments