【发布时间】:2017-04-23 05:44:27
【问题描述】:
我需要访问已使用 Cloudformation SAM 模板创建和订阅的网关的 arn。
当我尝试以下操作时,我收到错误“输出块中未解决的资源依赖项 [GetResource]。”
AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31
Resources:
TestFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: dist
Handler: index.handler
Events:
GetResource:
Type: Api
Properties:
Path: /path
Method: get
Outputs:
ReadApi:
Value: !Ref GetResource
Export:
Name: ReadApi
命令失败:/bin/sh -c aws cloudformation deploy --region "ap-southeast-2" --template-file ./serverless-output.yml --capabilities CAPABILITY_IAM --stack-name "SamTest"
创建变更集失败:Waiter ChangeSetCreateComplete 失败: 服务员遇到终端故障状态状态:FAILED。原因: 的输出块中未解决的资源依赖项 [GetResource] 模板
这样可以访问网关ref吗?
【问题讨论】:
标签: amazon-web-services amazon-cloudformation