Cloudfront LambdaEdge: ARNs must start with "arn:" and have at least 6 components: #26167
Labels
@aws-cdk/aws-cloudfront
Related to Amazon CloudFront
bug
This issue is a bug.
closing-soon
This issue will automatically close in 4 days unless further comments are made.
effort/medium
Medium work item – several days of effort
p2
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
Currently building the cloudfront-authorization-at-edge example in CDK with PYTHON and I´m running into an issue that does not seem to exist when using CDK with typescript. A collegue of mine also reported that he had the same issue with cdk java. This is also the reason why I have opened the issue here and not the the cloudfront-authorization-at-edge repository.
The bug (occurs during synth time):
Using a CfnApplication resource to reference from the serverless application repository that will generate 6 Lambda@Edge functions.
This resource generates a CF-Stack with outputs like:
Key: CheckAuthHandler
Value: arn:aws:lambda:us-east-1:xxx:function:xxdemoappD34XXXX-CheckAuthHandler-XXXX
And this 6 times, above just one as example.
Next step is to generate a function_version: IVersion based on the CF-Outputs, like:
This is necessary because the cloudfront distribution expects LambdaEdge functions to be passed in as IVersion objects, see here
This results in:
Expected Behavior
I expected the cloudfront distribution is able to be generated like it does in my CDK Typescript example that is build up almost the same.
Current Behavior
Reproduction Steps
See above
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.83.0
Framework Version
No response
Node.js Version
16x
OS
public.ecr.aws/docker/library/python:3.10.11-slim
Language
Python, Java
Language Version
python 3.10
Other information
No response
The text was updated successfully, but these errors were encountered: