Unknown parameter in LifecyclePolicies[1]: TransitionToPrimaryStorageClass with AWS CLI in EFS

0

Unable to apply lifecycle configuration to a file system in EFS using AWS CLI. I m using below command aws efs put-lifecycle-configuration \ --file-system-id $fsID \ --lifecycle-policies "[{\"TransitionToIA\":\"AFTER_60_DAYS\"},{\"TransitionToPrimaryStorageClass\":\"AFTER_1_ACCESS\"}]"

output: Parameter validation failed: Unknown parameter in LifecyclePolicies[1]: "TransitionToPrimaryStorageClass", must be one of: TransitionToIA

I followed the documentation but still unable to apply 'TransitionToPrimaryStorageClass' policy. Pls help

1 Answer
1
Accepted Answer

Hello,

Thank you for reaching out. The command you are referring to put EFS lifecycle policy is correct, this error occurs when running the command on an older version of AWS CLI. I recommend upgrading your AWS CLI to latest version and run the command again.

To upgrade to latest version of AWS CLI refer to knowledge base article -> https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

You can manage lifecycle policies on an existing filesystem using the console and cli. Refer to knowledge base article for steps -> https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html#enable-lifecycle-management

AWS
SUPPORT ENGINEER
Sathya
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions