cloudtools / cloudtools/troposphere

[In Troposphere] Is it possible to update the existing s3 bucket with Life Cycle policy to expire docs (in the bucket) after 30 days

Open
#1,060 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.9k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

template.add_description("blah ...")

s3bucket = template.add_resource(Bucket(
"S3Bucket",

BucketName="my-test-bucket",

# Attach a LifeCycle Configuration

LifecycleConfiguration=LifecycleConfiguration(Rules=[
# Add a rule to
LifecycleRule(
# Rule attributes
Id="S3BucketRuleFor90daysExpiry",
Prefix="/myindex",
Status="Enabled",
# Applies to current objects
ExpirationInDays=30
),
]),

))

This seems to get complaint around S3 bucket already existed. Is there anything like `update_resource` in Troposphere or an alternative of just updating life cycle policy of S3?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.