Closed marcelo321 closed 2 years ago
The same exact code works in my previous VPS. The following versions are the same in both servers:
aioboto3 8.3.0
aiobotocore 1.2.2
boto3 1.16.52
botocore 1.19.52
Python 3.8.10
So I am losing my mind trying to understand why it doesn't work here. (also other modules such as s3 and others don't work).
9.3.1 is out, I'd suggest trying with that.
import asyncio
import aioboto3
async def main():
session = aioboto3.Session()
async with session.client('ec2') as ec2:
await ec2.allocate_address(Domain='vpc')
if __name__ == '__main__':
asyncio.run(main())
This worked perfectly fine for me.
Description
I am trying to allocate a ec2 ip but I don't know where the error is:
I also tried:
I get "'ec2.ServiceResource' object has no attribute 'allocate_address'" but I don't know why.
Where can I get the documents to try do this properly? is there any way to chat about this apart from github @terrycain ?
The problem is this isn't running in my new server (which seem to have the same versions of async, python and os, but was working in the previous one). unable to find out why this isn't working now.