4

全新的 AWS 并尝试将堆栈与 CloudFormation 模板组合在一起。

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

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

我是否遗漏了一些东西,而这通过 CF 模板是不可能的?

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

谢谢。

4

3 回答 3

4

截至 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

于 2013-02-28T01:45:22.550 回答
2

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

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

于 2014-10-30T18:54:05.523 回答
0

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
于 2017-02-28T21:04:10.323 回答