Articles → AWS → Parameters In AWS CloudFormation
Parameters In AWS CloudFormation
Purpose
Create A YAML File
AWSTemplateFormatVersion: "2010-09-09"
Description: Create an S3 bucket with a parameter for the bucket name.
Parameters:
BucketName:
Type: String
Description: The name of the S3 bucket to create.
MinLength: 3
MaxLength: 6
AllowedPattern: '^[a-z0-9.-]*$'
ConstraintDescription: "Bucket name must only contain lowercase letters, numbers, periods, and hyphens."
Resources:
MyS3Bucket:
Type: 'AWS::S3::Bucket'
Properties:
BucketName: !Ref BucketName
Create A Stack