aws-scripts
aws-scripts copied to clipboard
Error listing reserved instances when the purchase is in payment-pending status
The reserver-instances.py script fails like this:
Reserved Id Instances Type Product Description Scope Zone Duration Time Left End Offering
Traceback (most recent call last):
File "/usr/local/bin/ec2-reserved.py", line 244, in <module>
sys.exit(main())
File "/usr/local/bin/ec2-reserved.py", line 150, in main
events, event_ids, instances = list_reserved_instances(filters)
File "/usr/local/bin/ec2-reserved.py", line 32, in list_reserved_instances
end_dt = datetime.strptime(str(end), "%Y-%m-%d %H:%M:%S+00:00")
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_strptime.py", line 332, in _strptime
(data_string, format))
ValueError: time data '2020-01-23 11:17:15.537000+00:00' does not match format '%Y-%m-%d %H:%M:%S+00:00'```