awslabs / aws-solutions-constructs

The AWS Solutions Constructs Library is an open-source extension of the AWS Cloud Development Kit (AWS CDK) that provides multi-service, well-architected patterns for quickly defining solutions
https://docs.aws.amazon.com/solutions/latest/constructs/
Apache License 2.0
1.25k stars 249 forks source link

aws-apigateway-dynamodb enable passing of methodOptions for use in addProxyMethodToApiResource #909

Open kevohagan opened 1 year ago

kevohagan commented 1 year ago

The addProxyMethodToApiResource accepts a params.methodOptions to be able to override/complement the default options defined

https://github.com/awslabs/aws-solutions-constructs/blob/dc48e482f936c856398c7e600a7805a99a3bea44/source/patterns/%40aws-solutions-constructs/core/lib/apigateway-helper.ts#L324

unfortunately the aws-apigateway-dynamodb construct does not pass this in its call the the addProxyMethodToApiResource method e.g

https://github.com/awslabs/aws-solutions-constructs/blob/dc48e482f936c856398c7e600a7805a99a3bea44/source/patterns/%40aws-solutions-constructs/aws-apigateway-dynamodb/lib/index.ts#L265

Use Case

Overriding default headers to specify CORS values would be a great use case to do it whilst overriding the default method responses.

Proposed Solution

Be able to pass in methodOptions as aditional opitional attribute . e.g : createIntegrationMethodOptions


This is a :rocket: Feature Request

biffgaut commented 1 year ago

Thanks, we'll take a look.