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 個回答
1
已接受的答案

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
支援工程師
Sathya
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南