Local Testing / Developing AWS Api Gateway
We have docked microservices on AWS, all behind the API gateway and accessible via REST. Authentication is managed by the API gateway.
Is there a way to test these REST microservices on a local machine (including the authentication / api logic)? Is there a way to force the API loopback to repeat requests to my local machine and invoke microservices running locally? What's the best way to check the local API Gateway authentication check?
Thank!
source to share
To use AWS API Gateway locally, roll out SAM locally using the SAM CLI .
SAM stands for Serverless Application Model. See the Quick Start Guide for developing serverless applications using SAM.
Other links:
AWS CLI (required to run SAM CLI)
source to share
To call microservices locally, you can work around this by using private integration on the API gateway, which will use VPCLink. VPCLink will connect to services running in the VPC via NLB. For example, the setting would be API gateway -> VPCLink integration -> NLB -> EC2 instance (for example acts as a proxy) -> calls local service (VPC connects to LAN via direct connection)
Although tricky to set up, possible workaround
source to share