gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 03:56:53 25 4
gpt4 key购买 nike

我正在尝试在特定区域 (us-west-2) 创建 s3 存储桶。使用 Cloudformation 模板似乎不可能实现这一点。有任何想法吗?我没有运气使用我读到的服务区域哈希约定明确命名它。

 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."
}
}
}

最佳答案

如果您想在特定区域创建 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 从云形成模板中执行此操作。属性

关于amazon-web-services - AWS Cloudformation 模板 - 在 S3 存储桶中设置区域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39587692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com