connecting AWS SAM Local with dynamodb in docker

前端 未结 6 1899
既然无缘
既然无缘 2020-12-02 13:39

I\'ve set up an api gateway/aws lambda pair using AWS sam local and confirmed I can call it successfully after running

sam local start-api

I\'ve

6条回答
  •  爱一瞬间的悲伤
    2020-12-02 14:02

    If your using sam-local on a mac like alot of devs you should be able to just use

    options.endpoint = "http://docker.for.mac.localhost:8000"

    Or on newer installs of docker https://docs.docker.com/docker-for-mac/release-notes/#docker-community-edition-18030-ce-mac59-2018-03-26

    options.endpoint = "http://host.docker.internal:8000"

    Instead of having to do multiple commands like Paul showed above (but that might be more platform agnostic?).

提交回复
热议问题