-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Addressed Pagination and empty Data handling issues in the AWS Systems Manager GetInventory custom connector and AWS-SSM-GetInstancePatches playbook #13392
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
Conversation
This reverts commit 1551180.
Bump solution version to 3.0.2 across templates and documentation. Update playbooks and templates to use the correct 'value' property for inventory entities instead of 'Entities'. Clean up commented code and add improved logging in the GetInventory function. Update deployment and package files to reflect the new version.
rahul0216
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address inline comments.
| next_token = req_body.get('NextToken') | ||
| max_results = req_body.get('MaxResults') | ||
|
|
||
| logging.info(f'Parsed Parameters - Filters: {filters}, Aggregators: {aggregators}, ResultAttributes: {result_attributes}, NextToken: {next_token}, MaxResults: {max_results}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove NextToken from logging.
|
|
||
| try: | ||
| logging.info('Calling function to get AWS SSM Inventory.') | ||
| logging.info(f'Parameters: {kwargs}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, don't log parameters, as it may contain sensitive data.
| "nextLink": None | ||
| } | ||
| logging.info(f'count: {count}') | ||
| logging.info(f'Response:{response}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here these two logging statements are not required or add generic statements.
rahul0216
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good.
Required items, please complete
Change(s):
Reason for Change(s):
Version Updated:
Testing Completed: