Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3: object lifecycle rule size ambiguity #27969

Closed
kabo opened this issue Nov 13, 2023 · 2 comments · Fixed by #27990
Closed

S3: object lifecycle rule size ambiguity #27969

kabo opened this issue Nov 13, 2023 · 2 comments · Fixed by #27990
Labels
@aws-cdk/aws-s3 Related to Amazon S3 documentation This is a problem with documentation. needs-review

Comments

@kabo
Copy link

kabo commented Nov 13, 2023

Describe the issue

It's possible to filter what objects a lifecycle rule applies to based on the size of the object using objectSizeGreaterThan and objectSizeLessThan.

So if I want the rule to apply to objects 10 bytes or bigger I should be able to set objectSizeGreaterThan: 9. Objects that are 9 bytes should be left untouched since 10 is greater than 9, but 9 is not greater than 9.

But when I look at the documentation for objectSizeGreaterThan it reads

Specifies the minimum object size in bytes for this rule to apply to.

So if I set it to 9 it would apply to objects of size 9 as well?

I don't know if the attribute should be renamed to objectSizeGreaterThanOrEqualTo or if the documentation for the attribute needs to be updated.

Links

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3.LifecycleRule.html#objectsizegreaterthan

@kabo kabo added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Nov 13, 2023
@github-actions github-actions bot added the @aws-cdk/aws-s3 Related to Amazon S3 label Nov 13, 2023
@khushail khushail added needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Nov 13, 2023
@scanlonp
Copy link
Contributor

According to the cloudformation docs, the values are exclusive. Our docs could probably include the extra line the cloudformation docs have.

mergify bot added a commit to msambol/aws-cdk that referenced this issue Nov 14, 2023
@mergify mergify bot closed this as completed in #27990 Nov 14, 2023
mergify bot pushed a commit that referenced this issue Nov 14, 2023
…#27990)

Docs: [cloudformation s3 bucket rule](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket-rule.html).

Closes #27969.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-s3 Related to Amazon S3 documentation This is a problem with documentation. needs-review
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants