我正在尝试使用boto3与我的AWS基础设施交互。 当我直接从python CLI(v 3.6.1)中使用boto3时,以下代码正在工作:
import boto3
client = boto3.ressource('iam')
print(client.User('myusername').arn)
但是,如果我试图从python脚本文件(test.py)中使用它,会得到以下错误:
$ python test.py
Traceback (most recent call last):
File "test.py", line 5, in <module>
client = boto3.ressource('iam')
AttributeError: 'module' object has no attribute 'ressource'
提前谢谢你
目前没有回答
相关问题 更多 >
编程相关推荐