V
V
Vladimir2019-10-10 16:19:21
Amazon Web Services
Vladimir, 2019-10-10 16:19:21

How do I test AWS API Gateway locally?

Good day to all!
I want to try using AWS API Gateway with Lambda Authority as a gateway for microservices.
That is, the Gateway acts as a check for access to an internal resource (address url).
It seems like there are no problems doing all this through the AWS console, but the main task is to test this gateway locally.
Locally, it is convenient to use SAM for testing lambdas, and there seem to be no problems in creating a template using only lambdas and running locally.
The problem is how to create a template for SAM that has proxy resources.
For example, I run a docker container with applications locally, accessing it directly is localhost:8080
How can I now create a SAM template.yaml so that the API Gateway and Authority lambda would be raised locally, that is, so that I could send a request to localhost:3000 (Gateway) - the request was checked by lambda and returned the result from localhost:8080?
The essence of the problem - I don't know how to create a template with AWS API Gateway with http proxy and run it through sam local.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-10-10
@inoise

Sam has a local module. At Serverless framework I heard too. The second one is actually better.

A
Andrey_Rogovsky, 2019-12-26
@Andrey_Rogovsky

I think it's worth looking at https://github.com/localstack/localstack

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question