By using AWS re:Post, you agree to the Terms of Use

CDK to add Http headers in the integration request


I have to add a few HTTP headers mapped to the context values that come from the lambda authorizer as shown below

"context": {
    "company_id": "xxxxx-xxx-xxxxxx",

and the headers will be sent to the minimal API.

Can anyone help me with the CDK code(.ts) that sends the custom headers to the .net API?

1 Answers


Thanks for reaching out. You can refer to this part of the CDK .NET reference for an example on how you can override the request and response parameters in order to add your custom headers. Please search for "Working with models" in the page if the link does not take you there directly.

Please check this out and let us know how you go.

answered 16 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions