Running bash script in Lambda function with dependencies

0

I have a bash script that uses node/npm and aws-cli, are there any guides on how I can run my bash script in a Lambda function? For node/npm, I prefer using nvm to easily manage the versions.

Vince
feita há 4 meses244 visualizações
2 Respostas
0

Hello.

I think you can run shell scripts using Lambda's custom runtime.
Please check the following document as it is a tutorial.
https://docs.aws.amazon.com/lambda/latest/dg/runtimes-walkthrough.html

profile picture
ESPECIALISTA
respondido há 4 meses
profile pictureAWS
ESPECIALISTA
avaliado há 4 meses
  • I followed this tutorial and it is very limited. I cannot figure out in what part should I do the installation. Also, most of the directories are read-only.

0

Hi,

I can suggest to get inspiration from a previous personal project of mine at https://github.com/didier-durand/lambda-cobol

In particular, look at the Docker file where I prepare a container with the runtime dependencies of my shell. You would have to do same with npm in your case.

Best,

Didier

profile pictureAWS
ESPECIALISTA
respondido há 4 meses
  • Thank you for the suggestion! If I understand it correctly, does this uses container for Lambda?

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas