Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the way credentials are obtained for FSxN file systems by allowing one secret per filesystem rather than a single secret for all credentials. Key changes include:
- Refactored functions and variable naming (e.g. processFile renamed to readFile) to support multiple credentials.
- Updated configuration and error handling logic to support either a secrets file (fsxnSecretARNsFile) or individual filesystem secret parameters.
- Revised CloudFormation template and documentation to reflect the new configuration options and improve clarity.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py | Updated credential retrieval logic and variable naming to support multi-secret usage. |
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/cloudformation-template.yaml | Modified parameter groups and descriptions for updated secret configuration. |
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/README.md | Corrected documentation typos and clarified instructions regarding new parameters. |
| Monitoring/ingest_nas_audit_logs_into_cloudwatch/README-MANUAL.md | Updated runtime version and fixed documentation typos related to Lambda layer upload. |
Comments suppressed due to low confidence (2)
Monitoring/ingest_nas_audit_logs_into_cloudwatch/ingest_audit_log.py:317
- Consider using a context manager (with statement) to open the file so that it is automatically closed in case of an exception.
f = open(auditLogPath, 'r')
Monitoring/ingest_nas_audit_logs_into_cloudwatch/cloudformation-template.yaml:146
- [nitpick] Consider using a boolean parameter for 'copyToS3' instead of a string to simplify type conversion in the Lambda function.
copyToS3: "false"
| - An S3 bucket to store the "stats" file and optionally a copy of all the raw NAS audit log files. It will also | ||
| hold a Lambda layer file needed to be able to an add Lambda Layer from a CloudFormation script. | ||
| - You will need to download the [Lambda layer zip file](https://raw.githubusercontent.com/NetApp/FSx-ONTAP-samples-scripts/main/Monitoring/ingest_nas_audit_logs_into_cloudwatch/lambda_layer.zip) | ||
| from this repo and upload it to the S3 bucket. Be sure to perserve the name `lambda_layer.zip`. |
There was a problem hiding this comment.
Typo detected: 'perserve' should be corrected to 'preserve'.
Suggested change
| from this repo and upload it to the S3 bucket. Be sure to perserve the name `lambda_layer.zip`. | |
| from this repo and upload it to the S3 bucket. Be sure to preserve the name `lambda_layer.zip`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed the way it obtains credentials for the FSxN file systems. Instead of one secret with all the credentials, it will assume one secret per file system. This required also having a way to pass an unknown number of credentials.