How to connect AWS SAM local lambda to DynamoDB local

http://host.docker.internal:8000

import { DynamoDB } from 'aws-sdk';const docClient = process.env.AWS_SAM_LOCAL == 'true'? new DynamoDB.DocumentClient({endpoint: 'http://host.docker.internal:8000',}) : new DynamoDB.DocumentClient();

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store