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

error deregistering image (--delete-ami) #14

Open
rafaeltuelho opened this issue Jun 5, 2023 · 0 comments
Open

error deregistering image (--delete-ami) #14

rafaeltuelho opened this issue Jun 5, 2023 · 0 comments

Comments

@rafaeltuelho
Copy link

rafaeltuelho commented Jun 5, 2023

Getting this error when using --delete-ami

[INFO] 2023-06-05 12:31:49,365 ec2-spot-converter - [STEP 22/26] Reboot new instance (if needed and requested)... 
[INFO] 2023-06-05 12:31:49,365 ec2-spot-converter -   => SUCCESS. No reason to reboot instance 'i-0113bca587b7f5c14'... Skipping...
[INFO] 2023-06-05 12:31:49,568 ec2-spot-converter - [STEP 23/26] Update CloudWatch alarms... => SKIPPED! Need '--update-cw-alarms' argument.
[INFO] 2023-06-05 12:31:49,568 ec2-spot-converter - [STEP 24/26] Untag resources... 
[INFO] 2023-06-05 12:31:49,870 ec2-spot-converter -   => SUCCESS. Successfully untagged ['i-0113bca587b7f5c14', 'eni-0e2f07f1dbb86ca46'].
[INFO] 2023-06-05 12:31:50,102 ec2-spot-converter - [STEP 25/26] Waiting for instance to be at expected states in target groups... => SKIPPED! Need '--wait-for-tg-states' argument.
[INFO] 2023-06-05 12:31:50,102 ec2-spot-converter - [STEP 26/26] Deregister image... 
Traceback (most recent call last):
  File "/Users/rsoares/dev/github/rafaeltuelho/sno-for-100/.run/ec2-spot-converter", line 1621, in <module>
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/Users/rsoares/dev/github/rafaeltuelho/sno-for-100/.run/ec2-spot-converter", line 1587, in main
    return_code, reason, keys = step["Function"]()
                                ^^^^^^^^^^^^^^^^^^
  File "/Users/rsoares/dev/github/rafaeltuelho/sno-for-100/.run/ec2-spot-converter", line 1212, in deregister_image
    snap_ids = [blk["Ebs"]["SnapshotId"] for blk in img["BlockDeviceMappings"]]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/rsoares/dev/github/rafaeltuelho/sno-for-100/.run/ec2-spot-converter", line 1212, in <listcomp>
    snap_ids = [blk["Ebs"]["SnapshotId"] for blk in img["BlockDeviceMappings"]]
                ~~~^^^^^^^
KeyError: 'Ebs'
@rafaeltuelho rafaeltuelho changed the title error deregistering image (--ami-delete) error deregistering image (--delete-ami) Jun 5, 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

1 participant