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
gefragt vor 5 Monaten434 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 5 Monaten
profile pictureAWS
EXPERTE
überprüft vor 4 Monaten
  • 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?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen