Running 'git' in AWS lambda

前端 未结 3 717
盖世英雄少女心
盖世英雄少女心 2021-02-07 13:03

I am trying to run git in AWS lambda to make a checkout of a repository.

This is my setup:

  • I am using nodejs 4.3
  • I am not using nodegit because I
3条回答
  •  终归单人心
    2021-02-07 13:43

    You might consider this a non-answer, but I've found the easiest way to run arbitrary binaries from Lambda is... not to. If I cannot do the work from within a platform-independent, non-binary approach, I integrate Docker into the workflow, managing Docker containers from the Lambda function.

    On AWS one way to do this is to use the Elastic Container Service (ECS) to spawn a task that runs git.

    If you stand up a Docker Swarm instance or integrate another Docker-API compatible service such as Rackspace Carina or Joyent's Triton, then you could use a project I personally put together specifically for integrating AWS Lambda with Docker: "Dockaless".

    Good luck!

提交回复
热议问题