Articles → AWS → Mappings In AWS CloudFormation

Mappings In AWS CloudFormation






Purpose





Example




AWSTemplateFormatVersion: 2010-09-09
Resources:
  MyS3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: 
        !FindInMap 
          - S3BucketMap
          - !Ref "AWS::Region"
          - BucketName

Mappings:
  S3BucketMap:
    us-east-1:
      BucketName: gyansangrah-bucket-useast1-xyz123
    us-east-2:
      BucketName: gyansangrah-bucket-useast2-xyz123
    us-west-2:
      BucketName: gyansangrah-bucket-uswest2-xyz123
    eu-central-1:
      BucketName: gyansangrah-bucket-eucentral1-xyz123





Output


Picture showing the output of mappings in aws cloudformation



Pseudo Parameters





Posted By  -  Karan Gupta
 
Posted On  -  Monday, March 24, 2025

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250