Open itissid opened 6 years ago
I'm not able to look at this at the moment but if you send a PR for the first issue, that would be great. Then I can look into the VPC vs. Standard aspect a bit later on. Sorry for not having time to figure it out right now.
@leeper See if this seems ok for you https://github.com/cloudyr/aws.ec2/pull/27 Ty
Finally had a chance to look into this and I also cannot figure out how to generate an IP for EC2-Classic.
Help wanted!
Working off the github version of clodyr ec2 API.
Based on the documentation the
allocate_ip(domain="vpc")
should produce an allocationId I can use to deallocate but it does not:The issue is easy to see from the code. Where it looks at
publicIp
field in the return code to determine whether the allocation is for vpc or standard. This does not seem correct based on the documentation. It seems you should look at the domain argument instead. I fixed the issue for myself, but I am not sure this fix is correct.Also while debugging the code I was not able to allocate an IP for standard domain at all. Is it possible that my AWS account has some sort of restriction where I can only allocate EIPs for VPC domain but not for standard that makes the API behave this way? Here is the debug log: