- Newest
- Most votes
- Most comments
When using KMS encryption with Amazon ECR repository creation templates, there are some specific requirements and potential issues that could cause your docker pull to fail.
If you're using a custom role ARN with KMS encryption in your repository creation template, you need to ensure that the role has the proper permissions. Specifically, the IAM role needs to have kms:CreateGrant, kms:RetireGrant, and kms:DescribeKey permissions for the KMS key being used.
When AWS KMS encryption is enabled for an ECR repository, the principal that deletes the repository must have the kms:RetireGrant permission. This enables the retirement of the grants that were added to the KMS key when the repository was created.
For your custom role, make sure it has access to the KMS key specified in your template. If you're using a customer-managed key, verify that the key policy allows the custom role to use it.
Additionally, note that dual-layer server-side encryption with AWS KMS (DSSE-KMS) is only available in the AWS GovCloud (US) Regions, so if you're trying to use the KMS_DSSE encryption type outside these regions, that could be causing issues.
When specifying a KMS key in your repository creation template, you can use the alias, key ID, or full ARN of the AWS KMS key. The key must exist in the same Region as the repository. If no key is specified when using KMS encryption type, the default AWS managed AWS KMS key for Amazon ECR will be used.
Without seeing your specific error messages or template configuration, it's difficult to pinpoint the exact issue, but these are common areas to check when troubleshooting KMS encryption with repository creation templates.
Sources
Encryption at rest - Amazon ECR
EncryptionConfiguration - Amazon Elastic Container Registry
Templates to control repositories created during a pull through cache or replication action - Amazon ECR
Creating a repository creation template in Amazon ECR - Amazon ECR
answered a year ago
Relevant content
asked 4 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 3 years ago
