AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Pseudo Parameters Reference

Pseudo Parameters are parameters that are predefined by AWS CloudFormation. You do not declare them in your template. Use them the same way as you would a parameter, as the argument for the Ref function.

For example, the following fragment assigns the value of the AWS::Region pseudo parameter:

"Outputs" {
   "MyStacksRegion" : { "Value" : { "Ref" : "AWS::Region" } }
}

The currently available pseudo parameters are listed here.

AWS::NotificationARNs

Returns the list of notification Amazon Resource Names (ARNs) for the current stack.

For example:

{
   "AWSTemplateFormatVersion" : "2010-09-09",
   "Resources" : {
      "MyEmbeddedStack" : {
         "Type" : "AWS::CloudFormation::Stack",
         "Properties" : {
            "TemplateURL" : "https://my-website.com/stack-spec.json",
            "NotificationARNs" : {"Ref" : "AWS::NotificationARNs"}
         }
      }
   }
}

To get a single ARN from the list, use Fn::Select:

"myASGrpOne" : {
   "Type" : "AWS::AutoScaling::AutoScalingGroup",
   "Version" : "2009-05-15",
   "Properties" : {
      "AvailabilityZones" : [ "us-east-1a" ],
      "LaunchConfigurationName" : { "Ref" : "MyLaunchConfiguration" },
      "MinSize" : "0",
      "MaxSize" : "0",
      "NotificationConfiguration" : {
         "TopicARN" : { "Fn::Select" : [ "0", { "Ref" : "AWS::NotificationARNs" } ] },
         "NotificationTypes" : [ "autoscaling:EC2_INSTANCE_LAUNCH", "autoscaling:EC2_INSTANCE_LAUNCH_ERROR" ]
      }
   }
}
AWS::Region

Returns a string representing the AWS Region in which the encompassing resource is being created.

AWS::StackId

Returns the ID of the stack as specified with the cfn-create-stack command.

AWS::StackName

Returns the name of the stack as specified with the cfn-create-stack command.