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["BlockDeviceMappings"] Might Be an Empty List
If an EC2 instance has no block device mappings, BlockDeviceMappings will be an empty list ([]).
Trying to access index 0 (BlockDeviceMappings[0]) when the list is empty will result in a list index out of range
error.
Ebs Key Might Not Exist
Even if BlockDeviceMappings contains elements, there is no guarantee that the first entry
(BlockDeviceMappings[0]) has an "Ebs" key.
If it does not, trying to access ["Ebs"]["AttachTime"] will raise a KeyError
To Reproduce
Steps to reproduce the behavior:
Run EC2 auditor specifically , this error can be seen
Expected behavior
There should be proper handling of this to prevent such errors.
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
Any stack traces, error reports, CloudTrail logs, etc.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
In AMAZON_EC2_AUDITOR, is failing with with exception: list index out of range.
This is happening in this code snippet :
i["BlockDeviceMappings"] Might Be an Empty List
If an EC2 instance has no block device mappings, BlockDeviceMappings will be an empty list ([]).
Trying to access index 0 (BlockDeviceMappings[0]) when the list is empty will result in a list index out of range
error.
Ebs Key Might Not Exist
Even if BlockDeviceMappings contains elements, there is no guarantee that the first entry
(BlockDeviceMappings[0]) has an "Ebs" key.
If it does not, trying to access ["Ebs"]["AttachTime"] will raise a KeyError
To Reproduce

Steps to reproduce the behavior:
Run EC2 auditor specifically , this error can be seen
Expected behavior
There should be proper handling of this to prevent such errors.
Screenshots
If applicable, add screenshots to help explain your problem.
Logs
Any stack traces, error reports, CloudTrail logs, etc.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: