The Metadata
attribute enables you to associate structured data with a resource. By adding a Metadata
attribute to a resource, you can add data in JSON or YAML to the resource declaration. In addition, you can use intrinsic functions (such as Fn::GetAtt and Ref), parameters, and pseudo parameters within the Metadata
attribute to add those interpreted values.
AWS CloudFormation doesn't validate the syntax within the metadata attribute.
ImportantCloudFormation doesn't redact or obfuscate any information you include in the metadata attribute. We strongly recommend you don't use this section to store sensitive information, such as passwords or secrets.
You can retrieve this data using the describe-stack-resource CLI command or the DescribeStackResource API operation.
The following template contains an Amazon S3 bucket resource with a Metadata
attribute.
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Resources" : {
"MyBucket" : {
"Type" : "AWS::S3::Bucket",
"Metadata" : {
"Object1" : "Location1",
"Object2" : "Location2"
}
}
}
}
YAML
AWSTemplateFormatVersion: '2010-09-09'
Resources:
MyBucket:
Type: AWS::S3::Bucket
Metadata:
Object1: Location1
Object2: Location2
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4