I followed this AWS blog to create Lambda@edge function so that I Cloufront can access S3 bucket encrypted with KMS key.
https://aws.amazon.com/blogs/networking-and-content-delivery/serving-sse-kms-encrypted-content-from-s3-using-cloudfront/
When I try to deploy this function using Actions -> “Deploy to Lambda@Edge” option, I am getting this error:
Cannot read properties of undefined (reading 'endsWith')
I am using “Node.js 16.x” runtime. Can someone please help resolve this nodeJS code error.