GetAZs

The get_azs method is the CloudFormation Fn::GetAZs equivalent.

Example Snippet

resource("MySubnet", "AWS::EC2::Subnet",
  vpc_id: ref("Vpc"),
  cidr_block: "10.0.0.0/24",
  availability_zone: select("0", get_azs(''))
)

Example Output

Resources:
  MySubnet:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId:
        Ref: Vpc
      CidrBlock: 10.0.0.0/24
      AvailabilityZone:
        Fn::Select:
        - '0'
        - Fn::GetAZs: ''

Back to Intrinsic Functions List.

Pro tip: Use the <- and -> arrow keys to move back and forward.

Edit this page

See a typo or an error? You can improve this page. This website is available on GitHub and contributions are encouraged and welcomed. We love pull requests from you!