3 Answers
- Newest
- Most votes
- Most comments
1
Hi Try and surround the header variable with { ... } that should work I think.
x-amazon-apigateway-integration:
integrationSubtype: "EventBridge-PutEvents"
requestParameters:
Detail: '{"myvar": "${request.header.test}"}'
DetailType: xxxx
Source: yyy
0
On a different note, does API GW not allow you to pass thru the request body if you are passing anything else?
This works:
{"var1": "${request.header.H1}", "tid": "${request.header.H2}", "body":"${request.body.myvar}"}
But this doesn't:
{"var1": "${request.header.H1}", "tid": "${request.header.H2}", "body":"${request.body}"}
answered 3 years ago
0
Sweet!! That did it. Is this documented anywhere?
answered 3 years ago
I don't think there is a clear documentation around it. I figured it out using this page
Relevant content
- asked 2 years ago

Try removing the brackets for you body. Accessing the entire object should work without brackets.
That does not seem to work. I get an error saying: _Invalid selection expression specified: Validation Result: warnings : [], errors : [Invalid source: _
Looks like I cannot do the whole body if I have anything else in the payload. If I target other properties on the body, it works, just not the top level body.