I have a Lambda that is working as a CloudFront Origin Request handler when referenced using an ARN that contains the version (e.g. ...:function:MyFunction:123
). I've created a PROD
alias to version 123 which I would like to use instead.
Using the ...:function:MyFunction:PROD
ARN yields the following error
com.amazonaws.services.cloudfront.model.InvalidLambdaFunctionAssociationException:
The function ARN must reference a specific function version. (The ARN
must end with the version number.) ARN:
...:function:MyFunction:PROD (Service: AmazonCloudFront; Status Code:
400; Error Code: InvalidLambdaFunctionAssociation; Request ID:
d407f350-bc7f-11e9-8498-e7f23762c03e)
Removing the version entirely (i.e. ...:function:MyFunction
) which according to the docs should hit latest, using $LATEST
or LATEST
for the version all fail with the same error.
The documentation that I've found all suggests that this should just work, so I'm not sure what I could have screwed up here. Might it be a problem with permissions on the IAM role I created?