Skip to content

Commit

Permalink
Enable AWS Infrequent access to save money on EFS
Browse files Browse the repository at this point in the history
Transition files to a slower, cheaper backing medium 90 days
after they were last *accessed*. They will be transferred back to regular
backing medium immediately on access. This saves a *lot* of money with
barely perceptible user performance hit. 90 days is the longest config,
and we can start here to be conservative. IA (Infrequent Access) is
documented in https://aws.amazon.com/efs/features/infrequent-access/
  • Loading branch information
yuvipanda committed Sep 28, 2023
1 parent d7c2f7a commit c19ec9c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions terraform/aws/efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ resource "aws_efs_file_system" "homedirs" {
Name = "hub-homedirs"
}

lifecycle_policy {
# Transition files to a slower, cheaper backing medium 90 days
# after they were last *accessed*. They will be transferred back to regular
# backing medium immediately on access. This saves a *lot* of money with
# barely perceptible user performance hit. 90 days is the longest config,
# and we can start here to be conservative. IA (Infrequent Access) is
# documented in https://aws.amazon.com/efs/features/infrequent-access/
transition_to_ia = "AFTER_90_DAYS"
}

lifecycle {
# Additional safeguard against deleting the EFS
# as this causes irreversible data loss!
Expand Down

0 comments on commit c19ec9c

Please sign in to comment.