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

Tiering Storage Configuration Improvements #1

Open
bensoer opened this issue Jan 9, 2022 · 0 comments
Open

Tiering Storage Configuration Improvements #1

bensoer opened this issue Jan 9, 2022 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@bensoer
Copy link
Owner

bensoer commented Jan 9, 2022

Background
Currently storage uses 3 tiers, Standard, Infrequent Access and Glacier. This is all set using the switchToWhateverTierAfterDays parameters.

Tiering is also assumed to be from most expensive to cheapest: Standard > Infrequent Access > Glacier . This functionality is assumed when viewing the settings

Problem
When switchToWhateverTierAfterDays is set to 0. The behavior is that the entry is not added to the lifecycle. This works if you want to skip InfrequentAccess and go straight to Glacier after X number of days. But if both settings are 0. Then everything will stay in Standard Tier. This is confusing and does not reflect intuitively to the expected functionality

Code Sample of the current functionality

if(switchToInfrequentAccessTierAfterDays !== undefined 
    && switchToInfrequentAccessTierAfterDays > 0){

    transitions.push(
        {
            storageClass: s3.StorageClass.INFREQUENT_ACCESS,
            transitionAfter: Duration.days(switchToInfrequentAccessTierAfterDays)
        }
    )
}else if(switchToInfrequentAccessTierAfterDays === undefined){
    transitions.push(
        {
            storageClass: s3.StorageClass.INFREQUENT_ACCESS,
            transitionAfter: defaultInfrequentAccessTransitionDuration
        }
    )
}

Resolution
Having 0 days should mean that it is then immediatly sent to the next storage tier. If all parameters have 0 days, then everything should be going straight to Glacier storage.

IF switchToInfrequentAccessTierAfterDays is 0. Then any upload should immediatly go into InfrequentAccess
IF switchToGlacierAccessTierAfterDays is 0. Then any upload should immediatly go into Glacier

IF switchToInfrequentAccessTierAfterDays is 0 AND switchToGlacierAccessTierAfterDays is 0. Then any upload should immediatly go info Glacier

@bensoer bensoer added bug Something isn't working enhancement New feature or request labels Jan 9, 2022
@bensoer bensoer self-assigned this Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant