Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade deprecated CDK property used by API Gateway patterns #31

Closed
1 of 2 tasks
beomseoklee opened this issue Jul 29, 2020 · 1 comment
Closed
1 of 2 tasks

Upgrade deprecated CDK property used by API Gateway patterns #31

beomseoklee opened this issue Jul 29, 2020 · 1 comment
Labels
feature-request A feature should be added or improved

Comments

@beomseoklee
Copy link
Contributor

I was using aws-cloudfront-apigateway-lambda pattern, and I found the default authorization type for API Gateway is IAM. I needed to change that one to NONE, but I saw that the pattern is using deprecated CDK property options.
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.LambdaRestApi.html

Use Case

options property is still available, but since it's deprecated property, it would be better to replace options to other live properties.

Proposed Solution

Since every options properties are available in LambdaRestApiProps, it would be easy to use LambdaRestApiProps itself instead of options.
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-apigateway.LambdaRestApiProps.html

Other

These are source code where options are used.

export function DefaultGlobalLambdaRestApiProps(_existingLambdaObj: lambda.Function, _logGroup: LogGroup) {
const defaultGatewayProps: api.LambdaRestApiProps = {
handler: _existingLambdaObj,
options: DefaultRestApiProps([api.EndpointType.EDGE], _logGroup)
};
return defaultGatewayProps;
}

export function DefaultRegionalLambdaRestApiProps(_existingLambdaObj: lambda.Function, _logGroup: LogGroup) {
const defaultGatewayProps: api.LambdaRestApiProps = {
handler: _existingLambdaObj,
options: DefaultRestApiProps([api.EndpointType.REGIONAL], _logGroup)
};
return defaultGatewayProps;
}

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@beomseoklee beomseoklee added feature-request A feature should be added or improved needs-triage The issue or PR still needs to be triaged labels Jul 29, 2020
@hnishar hnishar added in-progress This issue is being actively worked on and removed needs-triage The issue or PR still needs to be triaged labels Jul 30, 2020
@hnishar
Copy link
Contributor

hnishar commented Jul 31, 2020

This has been addressed in the latest release v1.54.0

@hnishar hnishar closed this as completed Jul 31, 2020
@hnishar hnishar removed the in-progress This issue is being actively worked on label Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved
Projects
None yet
Development

No branches or pull requests

2 participants