Giter Site home page Giter Site logo

Connecting to DynamoDB about docker-lambda HOT 6 CLOSED

lambci avatar lambci commented on August 27, 2024 1
Connecting to DynamoDB

from docker-lambda.

Comments (6)

justinmchase avatar justinmchase commented on August 27, 2024 1

I also connect to dynamo from my local lambda and it works for me, so it is possible. I use docker-compose to setup links because its easier but from first glance based on what you have there you need to expose the port on your dynamodb container and you also need to create a network and have them both join it:

docker network create test
docker run -d --name dynamodb --network test -p 8000:8000 deangiberson/aws-dynamodb-local
docker run --links dynamodb:dynamodb --network test -v "$PWD":/var/task lambci/lambda index.handler

from docker-lambda.

 avatar commented on August 27, 2024

do you have resolution ?

from docker-lambda.

justinmchase avatar justinmchase commented on August 27, 2024

The trick is to put them on the same network --network test

from docker-lambda.

DaveCollinsJr avatar DaveCollinsJr commented on August 27, 2024

Thanks for this @justinmchase !! Also FYI for anyone trying to link to another docker container that is running an API via docker-compose:

docker network
docker network <container-network-name> inspect

Then you can use the IP address exposed by that command to test, for example, your Lambda API client locally from a container run by the the commands in the docker-lambda Readme.

from docker-lambda.

nkravi avatar nkravi commented on August 27, 2024

Now with the new docker version use of --link is deprecated. Do you guys have any other approach for this?

from docker-lambda.

mhart avatar mhart commented on August 27, 2024

AFAICT this isn't docker-lambda specific – general docker network settings should work here.

from docker-lambda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.