何时应用 AWS ECR 生命周期策略?

When are AWS ECR lifecycle policies applied?

在添加像这样的生命周期策略后,我没有看到图像有任何变化:

{
  "rulePriority": 1,
  "description": "Keep last 5 images",
  "selection": {
    "tagStatus": "any",
    "countType": "imageCountMoreThan",
    "countNumber": 5
  },
  "action": {
    "type": "expire"
  }
}

它们何时以及如何应用?

来自first paragraph in the Lifecycle policies user guide

You should expect that after creating a lifecycle policy the affected images are expired within 24 hours.

我认为 AWS 故意含糊其词。

我注意到 S3 生命周期策略也是如此:我通常必须等到第二天才能看到结果,而且它们不会立即应用。