【问题标题】:Referencing Glacier as Resource in CloudFormation template?在 CloudFormation 模板中引用 Glacier 作为资源?
【发布时间】:2017-03-01 05:04:10
【问题描述】:

AWS 的新手,正在尝试将堆栈与 CloudFormation 模板组合在一起。

堆栈将有两个 EC2 实例,每个实例上运行一个 Windows 服务。一些存储将在 S3 上,一些将在 AWS Glacier 上。

我在 CF 模板中找不到有关如何将 Glacier 添加为资源的示例或说明。

我是否遗漏了什么,而这在 CF 模板中是不可能的?

以前有没有人这样做过,如果可能的话,有人可以提供样品吗?

谢谢。

【问题讨论】:

标签: amazon-web-services amazon-cloudformation amazon-glacier


【解决方案1】:

截至 2013 年 2 月 27 日,CloudFormation 不支持 Glacier。

如果/当它出现时,您会在此处的 CloudFormation 资源类型文档中看到 Glacier:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html

对从 S3 到 Glacier 的自动迁移的任何支持都应显示在此处:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html

要注册您希望亚马逊开发此功能的愿望,请在此论坛帖子中添加 +1 评论:

https://forums.aws.amazon.com/thread.jspa?threadID=117947

【讨论】:

    【解决方案2】:

    解决方法如下: 相反,您可以使用 S3 规则来附加 Glacier 策略或 S3 生命周期规则。此规则会在一段时间后自动将对象移动到 Glacier 甚至删除对象。

    http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-lifecycleconfig-rule.html

    【讨论】:

      【解决方案3】:

      AWS CloudFormation 添加了对自定义资源的支持,您可以在其中使用 AWS Lambda 函数来完成创建资源的工作,而 CloudFormation '不是本机支持。 CloudFormation 模板文件中的资源类型最终会是 AWS::CloudFormation::CustomResourceCustom::String

      有关更多信息,请查看这些官方 AWS 文档:

      1. http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cfn-customresource.html?shortFooter=true
      2. http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources-lambda.html?shortFooter=true

      【讨论】:

        猜你喜欢
        • 2021-04-22
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-09-30
        • 1970-01-01
        • 2017-05-05
        • 2016-05-14
        • 2020-10-17
        相关资源
        最近更新 更多