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 réponse
1
Réponse acceptée

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
INGÉNIEUR EN ASSISTANCE TECHNIQUE
Sathya
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions