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
질문됨 4달 전244회 조회
2개 답변
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
전문가
답변함 4달 전
profile pictureAWS
전문가
검토됨 4달 전
  • 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
전문가
답변함 4달 전
  • Thank you for the suggestion! If I understand it correctly, does this uses container for Lambda?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠