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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则