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
asked 4 years ago291 views
4 Answers
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
answered 4 years ago
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
answered 4 years ago
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

answered 4 years ago
0
answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions