feat(custom-resources): add optional logging flag to AwsCustomResourceProps#29596
feat(custom-resources): add optional logging flag to AwsCustomResourceProps#29596
AwsCustomResourceProps#29596Conversation
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
Signed-off-by: Francis <colifran@amazon.com>
775b2d2 to
0122e2d
Compare
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
AwsCustomResourceAwsCustomResource
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
Signed-off-by: Francis <colifran@amazon.com>
AwsCustomResourceAwsCustomResource
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
Signed-off-by: Francis <colifran@amazon.com>
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AwsCustomResourceAwsCustomResourceProps
TheRealAmazonKendra
left a comment
There was a problem hiding this comment.
I'm not sure this is quite what we want here. Please see my comments inline.
| /** | ||
| * Inputs to configure the Lambda function response. | ||
| */ | ||
| export interface RespondProps { |
There was a problem hiding this comment.
| export interface RespondProps { | |
| export interface ResponseProps { |
| responseStatus: string; | ||
|
|
||
| /** | ||
| * |
There was a problem hiding this comment.
Missing docstring. What's reason?
| /** | ||
| * API response data to include in the response. | ||
| */ | ||
| data: any; |
There was a problem hiding this comment.
data doesn't make very clear what this actually is.
| * | ||
| * @default false | ||
| */ | ||
| readonly disableLogging?: boolean; |
There was a problem hiding this comment.
A couple things in terms of this prop:
- What if we later want to allow for levels of logging or other logging settings? This doesn't really leave room for that possibility.
- A field that is defaulted to false and is named for the absence of something isn't typically the best way to name/default things.
Reason for this change
SDK v2 and v3 handlers for
AwsCustomResourcelog the event object passed to the handler, API responses, and caught /uncaught errors. This can potentially result in logging sensitive information that a user may wish to hide. This PR introduces adisableLoggingflag that can be used to disable all logging configured in the SDK v2 and v3 handlers.Description of changes
Added a
disableLoggingflag to theAwsCustomResourcePropsinterface. The value ofdisableLoggingis provided in the handler event object as aResourceProperty. All logging is now logged conditionally based on the value of this property.Description of how you validated changes
disableLoggingset to true was addeddisableLoggingisfalseby defaultdisableLoggingistrueit is set correctly in the synthesized templateChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license