To retrieve the registry policy you are currently
using.
aws ecr get-account-setting --name REGISTRY_POLICY_SCOPE
The parameter name is a required field. If you don't provide
the name you will receive the following error:
aws: error: the following arguments are required: --name
View the output for your registry policy command. In the
following example output, the registry policy version is
V1.
{
"name": "REGISTRY_POLICY_SCOPE",
"value": "V1"
}
You can change your registry policy version from
V1
to V2
. V1 is not the
recommended registry policy scope.
aws ecr put-account-setting --name REGISTRY_POLICY_SCOPE --value value
For example, use the following command to update to V2.
aws ecr put-account-setting --name REGISTRY_POLICY_SCOPE --value V2
View the output for your registry policy command. In the
following example output, the registry policy version was
updated to V2.
{
"name": "REGISTRY_POLICY_SCOPE",
"value": "V2"
}