You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just found an AMI missing the DeleteOn tag, checked the function logs, and found this:
Retaining AMI ami-REDACTED of instance i-REDACTED for 7 days
An error occurred (InvalidAMIID.NotFound) when calling the CreateTags operation: The image id '[ami-REDACTED]' does not exist: ClientError
Traceback (most recent call last):
File "/var/task/ami_backup.py", line 51, in lambda_handler
{'Key': 'DeleteOn', 'Value': delete_fmt},
File "/var/runtime/botocore/client.py", line 314, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/var/runtime/botocore/client.py", line 612, in _make_api_call
raise error_class(parsed_response, operation_name)
ClientError: An error occurred (InvalidAMIID.NotFound) when calling the CreateTags operation: The image id '[ami-REDACTED]' does not exist
An error occurred (InvalidAMIName.Duplicate) when calling the CreateImage operation: AMI name REDACTED-2019-05-06 is already in use by AMI ami-REDACTED: ClientError
Traceback (most recent call last):
File "/var/task/ami_backup.py", line 37, in lambda_handler
BlockDeviceMappings=block_device_mappings)
File "/var/runtime/botocore/client.py", line 314, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/var/runtime/botocore/client.py", line 612, in _make_api_call
raise error_class(parsed_response, operation_name)
ClientError: An error occurred (InvalidAMIName.Duplicate) when calling the CreateImage operation: AMI name REDACTED-2019-05-06 is already in use by AMI ami-REDACTED
I'm not sure how it should deal with this. Should it gracefully ensure the tag is on the AMI so it doesn't leave AMIs unable to be cleaned up? It would be bad to automatically delete an image that someone has created separately and happened to use the same naming convention as this module, but that seems unlikely and probably not worth worrying about.
I would/will submit a pull request to fix this, but don't have the time right now.
The text was updated successfully, but these errors were encountered:
I just found an AMI missing the
DeleteOn
tag, checked the function logs, and found this:I suppose adding a waiter would solve this.
And then when it retried:
I'm not sure how it should deal with this. Should it gracefully ensure the tag is on the AMI so it doesn't leave AMIs unable to be cleaned up? It would be bad to automatically delete an image that someone has created separately and happened to use the same naming convention as this module, but that seems unlikely and probably not worth worrying about.
I would/will submit a pull request to fix this, but don't have the time right now.
The text was updated successfully, but these errors were encountered: