user829174
user829174

Reputation: 6362

CloudFormation nested region

In a part of the CloudFormation script, how can I add the region name to be taken automatically?

"AllowedOrigins" : [
    "http://localhost:5002",
    { "Fn::Join" : ["", ["http://", { "Ref" : "webAppBucketName" } , ".s3-website-us-east-1.amazonaws.com" ]]}
],

Instead of the us-east-1

Upvotes: 3

Views: 80

Answers (1)

user829174
user829174

Reputation: 6362

Ok, got it. You can use AWS::Region

{ "Fn::Join" : ["", ["http://", { "Ref" : "webAppBucketName" } , { "Fn::Join" : ["", [".s3-website-", { "Ref" : "AWS::Region" } , ".amazonaws.com" ]]} ]]}

Upvotes: 1

Related Questions