lambda versioning

0

When my model triggers a call to a lambda, I can't currently specify a version number or alias. Could this be added for a future release of Events?

At present, can I assume this is calling the $LATEST version?

McMike
preguntada hace 4 años295 visualizaciones
4 Respuestas
0

You can specify a specific lambda function version or alias by providing a qualified function ARN in the detector model definition. An unqualified ARN will call the $LATEST version.

You can see more on qualified and unqualified function ARN here:
https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html

AWS
respondido hace 4 años
0

Thanks for the reply!

When I'm using the Events model editor, I believe it currently only lets me specify a lambda action, it only lets me specify the lambda by name, not ARN. Right?

And currently, it doesn't let me specify the name with 'my-lambda:3' or 'my-lambda:devel'.

One way or another, it would be handy to specify the specific version/alias to call. Does that seem reasonable?

McMike
respondido hace 4 años
0

The console does not support adding versions yet. For now you can set version in function ARN in detector model definition through CLI. We are working on adding this feature to console.

Example in adding versions:
You can add version to Lambda function ARN like the example below, and then update your detector model through update-detector-model command

{
    "lambda": {
        "functionArn": "arn:aws:lambda:<REGION>:<YOUR_ACCOUNT_ID>:function:<FUNCTION_NAME>:<VERSION>"
    }
}

You can check full detector model definition in attachment

For more info regarding update-detector-model command, please visit https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-commands.html

respondido hace 4 años
0
respondido hace 4 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas