All.
I am trying to implement a CloudFront custom s3 origin with index.html in a KMS encrypted bucket with a Lambda@Edge function that intercepts (trigged on get origin request), reads the AWS Sigv4 and writes the appropriate signature to the headers of the request, making it possible for CFD to deliver content from an encrypted s3 bucket. I am following the instructions in a blog post from AWS (https://aws.amazon.com/blogs/networking-and-content-delivery/serving-sse-kms-encrypted-content-from-s3-using-cloudfront/). I have tried multiple times and followed the instructions to the letter, but I get this error message once the Lambda intercepts the request.
The file size is under the 1MB limit. I even added extra permissions to the KMS policy for lambda and edgelambda, which don't appear to be needed, just in case. I found some other posts of the identical question a few months ago, but no one answered.
Thanks for any guidace!
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Name>dshaw-demo-cfd-kms-s3bucket</Name>
<Prefix/>
<Marker/>
<MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>index.html</Key>
<LastModified>2021-09-07T15:08:59.000Z</LastModified>
<ETag>"115e51178681629ec91d95062927264e"</ETag>
<Size>214</Size>
<Owner>
<ID>5f501fd3f58dddb6ddcbc5221715faf55e4fa3153032e5a351f56a2d695a3000</ID>
<DisplayName>RemovedDisplayNameForConfidentialityReasons</DisplayName>
</Owner>
<StorageClass>STANDARD</StorageClass>
</Contents>
</ListBucketResult>