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!

+4


source to share


3 answers


Unfortunately, API Gateway does not offer on-premises test / development solutions at this time. Thanks for your feedback; I've added your use case to our backlog.



Regards, Ritisha.

+3


source


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:

Launching API Gateway Locally



AWS CLI (required to run SAM CLI)

Install SAM CLI

SAM CLI Reference

+2


source


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

0


source







All Articles