下面是我尝试运行的简单代码段,它给出了异常。 我已经在本地配置了AWS,并且能够在AWS Opsworks UI中描述相同的堆栈。有人可以在这里提供帮助,其原因可能是
import boto3
client=boto3.client('opsworks')
response=client.describe_stack_summary(
StackId="6efce529-0b77-43dc-981b-ff20b906c4ae"
)
print(response)
Stacktrace出现错误:
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