AWS Cloudformation模板 - 在S3存储桶中设置区域

Fru*_*nWY 9 amazon-s3 amazon-web-services aws-cloudformation

我正在尝试在特定区域(us-west-2)创建一个s3存储桶.使用Cloudformation模板似乎无法做到这一点.有任何想法吗?我没有运气使用我读到的service-region-hash约定明确地命名它.

 Template:
 {
     "AWSTemplateFormatVersion": "2010-09-09",
     "Resources": {
       "S3Bucket": {
         "Type": "AWS::S3::Bucket",
         "Properties": {
           "AccessControl": "PublicReadWrite",
         }
       }
     },
     "Outputs": {
       "BucketName": {
         "Value": {
           "Ref": "S3Bucket"
         },
         "Description": "Name of the sample Amazon S3 bucket with a lifecycle configuration."
       }
     }
   }
Run Code Online (Sandbox Code Playgroud)

Fré*_*nri 9

如果要在特定区域中创建s3存储桶,则需要从此区域运行Cloudformation JSON模板.

cloudFormation的终点URL是基于地区的(https://aws.amazon.com/cloudformation/faqs/?nc1=h_ls#regionshttp://docs.aws.amazon.com/general/latest/gr/rande .html#cfn_region)你不能像今天的交叉检查区域那样.

我看到它已经在aws支持线程上讨论了几次,所以可能会在未来完成

存储桶是在1个区域内创建的,当您需要访问它时,您需要将该区域传递给s3端点.

如果要启用跨区域复制,可以使用ReplicationConfiguration属性从云编队模板执行此操作