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?

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

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

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

관련 콘텐츠