When Lambda does not connect to S3 in LocalStack AWS on WSL

Using S3 in Lambda on LocalStack AWS needs the endpoint url such as  'http://host.docker.internal:4566'

see https://hands-on.cloud/testing-python-aws-applications-using-localstack/

However this doesn't work with the LocalStack's default setting.

The problem is that a docker container used for Lambda does not see LocalStack server. To address this issue, use EDGE_BIND_HOST="0.0.0.0" instead of default value "127.0.0.1" . (see also LocalStack Document)


So that makes the cli command

EDGE_BIND_HOST="0.0.0.0" LAMBDA_DOCKER_FLAGS="--add-host host.docker.internal:host-gateway" localstack start




댓글

이 블로그의 인기 게시물

빈 플랜트 가찌아 호환 58 mm 바텀리스 포터필터, 디스트리뷰터

오디세이 OLED G9 모니터

How to solve Logi Options + Backend Connection Problem