Can bash script be written inside a AWS Lambda function

后端 未结 7 1872
北荒
北荒 2020-12-05 09:40

Can I write a bash script inside a Lambda function? I read in the aws docs that it can execute code written in Python, NodeJS and Java 8.

It is mentioned in some doc

7条回答
  •  醉梦人生
    2020-12-05 10:24

    As you mentioned, AWS does not provide a way to write Lambda function using Bash.

    To work around it, if you really need bash function, you can "wrap" your bash script within any languages.

    Here is an example with Java:

    Process proc = Runtime.getRuntime().exec("./your_script.sh");  
    

    Depending on your business needs, you should consider using native languages(Python, NodeJS, Java) to avoid performance loss.

提交回复
热议问题