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
已提問 4 年前檢視次數 295 次
4 個答案
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
已回答 4 年前
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
已回答 4 年前
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

已回答 4 年前
0
已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南