Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 484
user829174 Avatar asked Feb 03 '26 20:02

user829174


1 Answers

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

{ "Fn::Join" : ["", ["http://", { "Ref" : "webAppBucketName" } , { "Fn::Join" : ["", [".s3-website-", { "Ref" : "AWS::Region" } , ".amazonaws.com" ]]} ]]}
like image 62
user829174 Avatar answered Feb 05 '26 11:02

user829174