Create API gateway in localstack

后端 未结 2 1275
再見小時候
再見小時候 2021-02-04 21:19

I was able to setup localstack (https://github.com/atlassian/localstack) and also create lambda function in it (using create-function ... command). However, I couldnt find a way

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 21:33

    Looks like there is an open issue related to setting up API Gateway with localstack on GitHub:

    https://github.com/localstack/localstack/issues/129

    You could try following the steps provided in the answer there.

    Copied from the GitHub issue:

    """

    One option would be to use the serverless framework (https://github.com/serverless/serverless). Otherwise, you can call the LocalStack services directly (via the CLI or an SDK) to create an API Gateway resource+method+integration, and connect them to your Lambda function.

    Here are a few pointers that might be helpful: https://ig.nore.me/2016/03/setting-up-lambda-and-a-gateway-through-the-cli/ (the "Creating a role" part can be skipped) https://github.com/atlassian/localstack/issues/101 https://github.com/temyers/serverless-localstack """

提交回复
热议问题