Skip to content

Commit

Permalink
Merge pull request #17 from AllenInstitute/remove-default-efs-ia-life…
Browse files Browse the repository at this point in the history
…cycle-policy

Remove EFS default 7-day -> IA lifecycle policy
  • Loading branch information
njmei authored Jul 19, 2024
2 parents 0a4a622 + f7e066b commit afe658a
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 because
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 afe658a

Please sign in to comment.