CodexBloom - Programming Q&A Platform

AWS CloudFormation how to to Create EFS with Incorrect Lifecycle Management Policy

👀 Views: 92 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-08
AWS CloudFormation EFS lifecycle-management yaml

I've searched everywhere and can't find a clear answer. I can't seem to get I'm currently trying to create an Amazon EFS (Elastic File System) using AWS CloudFormation, but I keep running into issues with the lifecycle management policy... I want to set a lifecycle policy to transition files to the EFS Infrequent Access (IA) storage class after 30 days, but CloudFormation throws the following behavior during stack creation: `InvalidParameterValue - Invalid lifecycle management policy configuration.` Here's the snippet of my CloudFormation template: ```yaml Resources: MyEFS: Type: 'AWS::EFS::FileSystem' Properties: LifecyclePolicies: - TransitionToIA: AFTER_30_DAYS PerformanceMode: GENERAL_PURPOSE Encrypted: true ``` I've ensured that the settings for the `Encrypted` property are correct, but it seems like the lifecycle policy setting is not being accepted. I checked the AWS documentation, and it states that lifecycle management policies can only be applied if the EFS is enabled for the Infrequent Access storage class. I've also tried removing the lifecycle policies temporarily to see if the stack would create successfully, and it does without those lines. However, I really need the lifecycle management in place for cost savings. Could there be any additional requirements for the lifecycle policies to be accepted in CloudFormation? I'm using the latest version of the AWS provider, and my CloudFormation template is set to YAML format. Any help would be appreciated! I'm developing on CentOS with Yaml. I'd really appreciate any guidance on this. I'm developing on CentOS with Yaml. I'd really appreciate any guidance on this.