Lambda Container Runtime - At Invocation, pass in overrides

0

I have an idea for a service that I want to deploy, and it will be reliant on being able to pass in a COMMAND override at invocation. I can manually add what I need in the management console (shown below), but how can I pass in this information when I invoke the lambda, which in my case, will likely be started from a Step Function.

Enter image description here

Perhaps I am overlooking something obvious in the docs, but is it possible to modify these parameters? I would like to stay with lambda if possible, as I have had a hard time in the past wrangling ECS tasks.

profile picture
已提问 4 个月前428 查看次数
1 回答
0

When you launch a lambda function you can pass a payload into the function. Then depending on the parameters execute a different subroutine or function as part of the lambda handler.

https://docs.aws.amazon.com/step-functions/latest/dg/connect-lambda.html

profile picture
专家
已回答 4 个月前
profile pictureAWS
专家
已审核 4 个月前
  • Thank you for the reply. What I am looking for are the parameters that I would need to pass in. Perhaps its documented somewhere, but I haven't yet seen it. For example, something in the direction of below (which doesn't work).

    {
      "FunctionName": "arn:aws:lambda:us-east-1:xxxxxxxxxx:function:quarto-poc1:$LATEST",
       "CmdOverride": "app.handler"
    }
    

    Also worth noting is if I add the CmdOverride in the payload, based on my testing the override is ignored.

  • You would have to build into your code to handle the payload and react based on the parameters

  • Ok, so to confirm, even though we have a mechanism via the web console, the same functionality doesn't exist programmatically?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则