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

Issue with paginator not being used in moved_to_root and direct access to key #272

Closed
rickardl opened this issue Jun 8, 2020 · 1 comment
Milestone

Comments

@rickardl
Copy link
Contributor

rickardl commented Jun 8, 2020

Hi,

When moving one of our larger accounts back to the root OU we get the following error in one of the step functions (that invoked moved_to_root). Our SSM Parameters has empty Descriptions and it has over 100 entries and this becomes an issue with how the current implementation handles some edge cases.

[ERROR] KeyError: 'Description'
Traceback (most recent call last):
  File "/var/task/moved_to_root.py", line 93, in lambda_handler
    execute_move_action(action, account_id, parameter_store, event)
  File "/var/task/moved_to_root.py", line 76, in execute_move_action
    return remove_base(account_id, regions, role, event)
  File "/var/task/moved_to_root.py", line 65, in remove_base
    thread.join()
  File "/opt/python/thread.py", line 30, in join
    raise self.exc
  File "/opt/python/thread.py", line 22, in run
    **self._kwargs
  File "/var/task/moved_to_root.py", line 31, in worker_thread
    parameters = [param['Name'] for param in parameter_store.client.describe_parameters()['Parameters'] if 'Used by The AWS Deployment Framework' in param['Description']]
  File "/var/task/moved_to_root.py", line 31, in <listcomp>
    parameters = [param['Name'] for param in parameter_store.client.describe_parameters()['Parameters'] if 'Used by The AWS Deployment Framework' in param['Description']]

Digging into the deployment framework we can see that moved_to_root.py has the following issues in the worker_thread

  • it does not paginate the API response
  • it doesn't take into the consideration that the Description key for a parameter might be empty, therefore the list comprehension can fail with an error.
@rickardl rickardl changed the title Issue with paginator not using Tags and direct access instead of key. Issue with paginator not being used in moved_to_root and direct access to key Jun 8, 2020
@sbkok sbkok added this to the v3.2.0 milestone Nov 9, 2021
@sbkok
Copy link
Collaborator

sbkok commented Jan 24, 2023

Thank you for your patience. I am happy to inform you that this issue has been resolved in our latest release v3.2.0 just now.
I'm hereby closing this issue. Please open a new issue if you are experiencing any issues with the latest release.

@sbkok sbkok closed this as completed Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants