Using AWS Cloudfront's Lambda@edge capability, I want to pass some string generated on the Client Request through to the Client Response. Preferably without modifying the source at the server.
I notice that the ID AWS utilizes, x-amz-cf-id
, is in the headers for the response on my browser, and is added by AWS before the Origin Request to identify that individual request.
So it would seem on the surface that this data could be passed via header, but setting a custom-named header does not appear to make it back to the browser. I used:
request.headers['x-pass-test'] = [{key: "x-pass-test", value:"theTestValue"}];
Any ideas, or is this a known limitation?
Clarification
The short version is, is there a way to get data from the Client Request lambda to the Client Response lambda?