python-2.7 - 使用 boto 描述 Opsworks 堆栈的问题
问题描述
下面是我试图运行的简单代码片段,它给出了异常。我已经在本地配置了 AWS,并且能够在 AWS Opsworks UI 中描述相同的堆栈。有人可以在这里帮忙吗,可能是什么原因:
import boto3
client=boto3.client('opsworks')
response=client.describe_stack_summary(
StackId="6efce529-0b77-43dc-981b-ff20b906c4ae"
)
print(response)
堆栈跟踪错误:
Traceback (most recent call last):
File "botoTest.py", line 9, in <module>
StackId="6efce529-0b77-43dc-981b-ff20b906c4ae"
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/botocore/client.py", line 320, in _api_call
return self._make_api_call(operation_name, kwargs)
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-
packages/botocore/client.py", line 623, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.errorfactory.ResourceNotFoundException: An error occurred
(ResourceNotFoundException) when calling the DescribeStackSummary
operation: Unable to find stack with ID 6efce529-0b77-43dc-981b-
ff20b906c4ae
解决方案
推荐阅读
- python - 使用索引数组在二维数组中索引列值
- spring - SpringBoot using JMS (OracleAQ) + SpringData JPA transaction timeout issue
- python - 关闭应用程序后如何在 QListWidgets 中保存和重新加载项目?
- javascript - Can asynchronous fetch still freeze the browser?
- css - custom style file style.css attached in drupal theme, but not working
- roxygen2 - 如何扩展包的 S3 方法的文档?
- javascript - igdb.com api | React Axios 请求被 CORS 策略阻止;请求的资源上不存在“Access-Control-Allow-Origin”标头
- c# - EF Core using navigation property when querying parent and child separatedly
- wordpress - 修改 WPownloadManager 按钮链接颜色
- sql-server - 为什么我无法打开 SQL Server Instace 的备份文件夹?如何授予 Windows 帐户访问此文件夹的权限?