gpt4 book ai didi

amazon-web-services - AWS S3 生命周期规则未转换为 Glacier,不确定问题是什么?

转载 作者:行者123 更新时间:2023-12-03 07:33:41 27 4
gpt4 key购买 nike

我有这个 CFT,它创建了一个具有生命周期规则的 S3 存储桶,可以立即转换到 Glacier,但它不起作用,几天后它们仍然处于标准状态。任何帮助将不胜感激,谢谢。

AWSTemplateFormatVersion: 2010-09-09

Description: Template to setup lifecycle configuration

Parameters:

BucketName:

Type: String

Description: Name of the bucket on which lifecycle configuration will apply

Default: lifecycle-config-testing-bucket

Resources:

DemoBucket:

Type: 'AWS::S3::Bucket'

Properties:

BucketName: !Ref BucketName

LifecycleConfiguration:

Rules:

- Id: Transition all objects in the bucket after immediately

# Prefix: ""

Status: Enabled

Transitions:

- TransitionInDays: 0

StorageClass: GLACIER

ExpirationInDays: 365

Outputs:

BucketName:

Value: !Ref DemoBucket

Description: Name of the sample Amazon S3 bucket with a lifecycle configuration.

最佳答案

S3 生命周期转换具有最小年龄规则,每个对象都需要满足该规则。在 S3 中上传文件后,您无法立即将文件直接移至 Glacier。

通用生命周期策略可以是S3(标准)-> 30天-> S3(不频繁访问)-> 60天-> 冰川

查看文档中有关最小天数的详细信息。

https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-transition-general-considerations.html

关于amazon-web-services - AWS S3 生命周期规则未转换为 Glacier,不确定问题是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72371512/

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