Skip to content

Commit

Permalink
Remove EFS default 7-day -> IA lifecycle policy
Browse files Browse the repository at this point in the history
  • Loading branch information
njmei committed Jul 18, 2024
1 parent 0a4a622 commit 3990797
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/aibs_informatics_cdk_lib/constructs_/efs/file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,24 @@ def __init__(
env_base: EnvBase,
file_system_name: Optional[str],
vpc: ec2.Vpc,
efs_lifecycle_policy: Optional[efs.LifecyclePolicy] = None,
) -> None:
"""Construct for setting up an EFS file system
NOTE: If the EFS filesystem is intended to be deployed in efs.ThroughputMode.BURSTING
it may be counterproductive to set an efs_lifecycle_policy other than None becuase
EFS files in IA tier DO NOT count towards burst credit accumulation calculations.
See: https://docs.aws.amazon.com/efs/latest/ug/performance.html#bursting
"""
super().__init__(scope, id, env_base)
self._file_system = EnvBaseFileSystem(
self,
"fs",
scope=self,
id="fs",
env_base=self.env_base,
file_system_name=(
self.get_name_with_env(file_system_name) if file_system_name else None
),
lifecycle_policy=efs.LifecyclePolicy.AFTER_7_DAYS,
lifecycle_policy=efs_lifecycle_policy,
out_of_infrequent_access_policy=efs.OutOfInfrequentAccessPolicy.AFTER_1_ACCESS,
enable_automatic_backups=False,
throughput_mode=efs.ThroughputMode.BURSTING,
Expand Down

0 comments on commit 3990797

Please sign in to comment.