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
質問済み 5ヶ月前434ビュー
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
エキスパート
回答済み 5ヶ月前
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?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ