我想输出一个从CloudFormation自定义资源中获取的值。我肯定已经返回了这个值,但是我不确定如何在输出中引用它。
这是我的template.yml
:
Outputs:
customresourceoutput:
Value:
!GetAtt creates3bucketlambda.myvalue
Resources:
creates3bucketlambda:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs6.10
CodeUri: setups3bucket
MemorySize: 512
Timeout: 300
Policies:
- AWSLambdaBasicExecutionRole
- AmazonS3FullAccess
Creates3BucketLoginPage:
Type: Custom::AppConfiguration
Properties:
ServiceToken: !GetAtt creates3bucketlambda.Arn
aOrg:
!Ref aOrg
我收到的错误信息是:
Failed to create the changeset: Waiter
ChangeSetCreateComplete failed: Waiter encountered a terminal failure
state Status: FAILED. Reason: Template error: resource
creates3bucketlambda does not support attribute type myvalue in
Fn::GetAtt
我不确定是否要使用!Sub
、!Ref
。
AWS::CloudFormation::CustomResource
或Custom::*String*
资源类型在您的模板中定义自定义资源。" - undefined