-
Notifications
You must be signed in to change notification settings - Fork 4.4k
[@aws-cdk/aws-apigatewayv2-integrations] support parameter mapping in Http Integrations #15293
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-apigatewayv2-integrationsRelated to AWS APIGatewayv2 IntegrationsRelated to AWS APIGatewayv2 Integrationseffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
I would like to have a possibility to configure parameter mapping to e.g. append or remove specific parameter in forwarded request.
Use Case
Currently there is no possibility to configure it, specifically in context of HttpAlbIntegration. These are only possible props:
const integration = new HttpAlbIntegration({
listener: httpApiListener,
vpcLink: httpVpcLink,
method: HttpMethod.ANY
})
This functionality is available in AWS console and it's missing in aws cdk. It can be very helpful to e.g. pass some authorizer context parameters down to the backend.
Proposed Solution
It would be nice to have some additional field where proper mapping can be configured e.g.:
const integration = new HttpAlbIntegration({
listener: httpApiListener,
vpcLink: httpVpcLink,
method: HttpMethod.ANY,
mapping: {
request: {
{
parameter: "header.requestHeaderAppend",
modification: APPEND,
value: "$context.authorizer.PrincipalId"
},
{
parameter: "header.requestHeaderRemove",
modification: REMOVE,
}
},
{
parameter: "header.requestHeaderOverwrite",
modification: OVERWRITE,
value: "request overwrite value"
}
}
response: {
{
parameter: "header.responseTest",
modification: APPEND,
value: "custom response value"
}
}
}
})
Same interface can be applied to rest of Integration classes.
Other
- 👋 I may be able to implement this feature request
-
⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-apigatewayv2-integrationsRelated to AWS APIGatewayv2 IntegrationsRelated to AWS APIGatewayv2 Integrationseffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2