Git Product home page Git Product logo

Comments (6)

mhart avatar mhart commented on July 16, 2024

What do you mean by "define a trigger"?

Do you mean you want to create a trigger from a live DynamoDB instance and have it run a Lambda locally? If so, then you're right, that's not possible.

The closest way to do it off the top off my head would be to trigger a lightweight Lambda function that's just a passthrough/proxy to a known address that you expose a local http server on that invokes your local lambda. ie, DynamoDB Stream->Lambda->Local Server->Local Lambda

from docker-lambda.

mikebrules avatar mikebrules commented on July 16, 2024

hi @mhart thanks for getting back - no, I wanted to run it all locally (local dynamo, local lambda) so I can replicate "live" behaviour. I figured there might be a way to do it by starting a local node app that consumes the dynamo stream of my local lambda, and call the sam local "invoke" method on my local lambda, passing it the payload dynamo event? Maybe?

from docker-lambda.

mikebrules avatar mikebrules commented on July 16, 2024

In "real life" the AWS Lambda polls Dynamo on your behalf, so I guess this is an approximation of that

from docker-lambda.

mhart avatar mhart commented on July 16, 2024

Right, there's nothing out of the box that can do that locally I don't think – https://github.com/localstack/localstack would be the nearest candidate. It's outside the scope of the docker-lambda project for sure. But certainly should be possible to build something!

from docker-lambda.

mikebrules avatar mikebrules commented on July 16, 2024

thanks loads @mhart

from docker-lambda.

theowenyoung avatar theowenyoung commented on July 16, 2024

@mikebrules Hi, I think aws can support local api gateway, it also use the lambda-docker as lambda local runtime.

but it need a docker socket dependence, I need a only docker normal dependence solution,

so here is my solution: https://github.com/theowenyoung/aws-lambda-docker-local-example

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.