Pseudo parameters | link
- AWS::AccountId
- AWS::Partition
- AWS::Region
- AWS::StackId
- AWS::StackName
- AWS::URLSuffix
- AWS::NotificationARNs
- AWS::NoValue
Dynamic References | link
For transforms, such as AWS::Include and AWS::Serverless, AWS CloudFormation doesn't resolve dynamic references before invoking any transforms.
Do not create a dynamic reference that has a backslash () as the final value. AWS CloudFormation cannot resolve those references, which results in a resource failure.
-
ssm, for plaintext values stored in AWS Systems Manager Parameter Store.
-
ssm-secure, for secure strings stored in AWS Systems Manager Parameter Store.
-
secretsmanager, for entire secrets or secret values stored in AWS Secrets Manager.
-
{{resolve:ssm:parameter-name:version}}
-
{{resolve:ssm-secure:parameter-name:version}}
-
{{resolve:secretsmanager:secret-id:secret-string:json-key:version-stage:version-id}} e.g. {{resolve:secretsmanager:MyRDSSecret:SecretString:password}}
Condition intrinsic functions | link
Fn::And
MyAndCondition: !And
- !Equals ["sg-mysggroup", !Ref ASecurityGroup]
- !Condition SomeOtherCondition
Fn::Equals
UseProdCondition:
!Equals [!Ref EnvironmentType, prod]
Fn::If
Type: 'AWS::EC2::Volume'
Properties:
Size:
'Fn::If':
- CreateLargeSize
- '100'
- '10'
Fn::Not
MyNotCondition:
!Not [!Equals [!Ref EnvironmentType, prod]]
Fn::Or
MyOrCondition:
!Or [!Equals [sg-mysggroup, !Ref ASecurityGroup], Condition: SomeOtherCondition]
Within each condition, you can reference another condition, a parameter value, or a mapping.
CloudFormation evaluates all the conditions in your template before creating any resources.
Demo Intrinsic Functions
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
Demo Language extensions transform. Uses new intrinsic functions Fn::Length, Fn::ToJsonString
https://github.com/aws-cloudformation/cfn-language-discussion
SSM Secure reference is not supported in: [AWS::IAM::Role/Properties/Tags,AWS::IAM::Role/Properties/Tags]
- Key: "DynamicSsmSecureLatest"
Value: !Sub "{{resolve:ssm-secure:/demo/database/password}}"
- Key: "DynamicSsmSecureVersion"
Value: !Sub "{{resolve:ssm-secure:/demo/database/password:1}}"
SSM Parameters are supported only for selected resources.
- AWS::DirectoryService::MicrosoftAD
- AWS::DirectoryService::SimpleAD
- AWS::ElastiCache::ReplicationGroup
- AWS::IAM::User
- AWS::KinesisFirehose::DeliveryStream
- AWS::OpsWorks::App
- AWS::OpsWorks::Stack
- AWS::OpsWorks::Stack
- AWS::RDS::DBCluster
- AWS::RDS::DBInstance
- AWS::Redshift::Cluster
Cause: FindInMap did not resolve any value. No defaulting.
-
[Parameters] https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html
-
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html
-
https://github.com/aws-cloudformation/cfn-language-discussion
-
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks-event-bridge.html
-
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/pseudo-parameter-reference.html
-
Stack Sets
-
EventBridge Events