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 Risposta
1
Risposta accettata

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
TECNICO DI SUPPORTO
Sathya
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande