How to declare multi region access point in cloudformation template

0

I want to add a multi region access point policy to my cloudformation template and I am getting a syntax error as undefined resource when running the cloudformation template Template error: instance of Fn::GetAtt references undefined resource m67ckh1qr8zan.mrap Can someone help me with the correct format of declaring and using a multi region access point by a cloudformation template. Thanks.

  • Could you please edit your question and add a code snippet showing a part of your CloudFormation template where you define the resource and reference it? Without looking at the template, it is hard to tell what exactly might cause the error. Thank you!

1 個回答
1

Hi,

Hope this template helps. Pre-requisite is to have at least two buckets in different regions created already so as to reference those bucket names in the CF template

{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "MyMRAP": {
          "Type" : "AWS::S3::MultiRegionAccessPoint",
          "Properties" : {
            "PublicAccessBlockConfiguration" : {
              "BlockPublicAcls" : "True",
              "BlockPublicPolicy" : "True",
              "IgnorePublicAcls" : "True",
              "RestrictPublicBuckets" : "True"
            },
            "Regions" : [ {"Bucket":"bucket1"}, {"Bucket": "bucket2"} ]
        }
      }
    }
}

Replace the bucket1/bucket2 in above code with the actual bucket names. I was able to successfully create Multi region Access point with the above code

--Syd

profile picture
Syd
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南