awslabs / awslabs/aws-solutions-constructs

RestApiProps or LabdaRestApiProps are not being considered in the core apigateway helper module

Open
#84 0 comments 0 reactions 0 assignees View on GitHub
bug needs-triage
Dominant language
TypeScript
Stars
1.4k
Forks
268
Avg merge
5h 18m
Merged PRs (30d)
5

Description

All constructs that interface with apigateway allows user of the constructs either pass `api.RestApiProps` or `api.LambdaRestApiProps` as one of the props to the construct. However, some of the props which user wish to override by specifying `api.RestApiProps` or `api.LambdaRestApiProps` are not considered in the core `apigateway-helper` module.

Examples -

- setting `cloudWatchRole` to `false` in `api.RestApiProps` still creates cloudWatch role
- specifying defaultMethodProps in `api.RestApiProps` are not considered while adding Methods to the APIG resources. For Instance, `statusCode` 200 is always overridden even though user specifies one in `defaultMethodProps.methodResponses`.

This is :bug: Bug Report

Contributor guide

Open the contributing guide

Research direction

Start in the core `apigateway-helper` module and trace how `api.RestApiProps` and `api.LambdaRestApiProps` are applied when API resources and methods are created. Done means `cloudWatchRole: false` prevents the role and `defaultMethodProps.methodResponses` can preserve the user-specified status code.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.