Skip to content

Why do I receive an Amazon S3 GetBucketAcl permission error when I update my AWS Private CA CRL configuration?

3 minute read
0

I updated my AWS Private Certificate Authority (AWS Private CA) to configure a certificate revocation list (CRL). However, I received a "The ACM Private CA Service Principal 'acm-pca.amazonaws.com' requires 's3:GetBucketAcl' permissions" error.

Short description

AWS Private CA places the CRL into an Amazon Simple Storage Service (Amazon S3) bucket that you designate for use. Your Amazon S3 bucket must be secured by an attached permissions policy. Authorized users and service principals require Put permission to allow AWS Private CA to place objects in the bucket and Get permission to retrieve them. For more information, see Access policies for CRLs in Amazon S3.

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

To replace the default Amazon S3 policy with a less permissive policy, complete the following steps:

  1. Open the Amazon S3 console.

  2. From the list of buckets, open the bucket that you want to place the CRL in.

  3. Choose the Permissions tab.

  4. In Bucket policy, choose Edit.

  5. In Policy, copy and paste the following policy:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Principal": {
            "Service": "acm-pca.amazonaws.com"
          },
          "Action": [
            "s3:PutObject",
            "s3:PutObjectAcl",
            "s3:GetBucketAcl",
            "s3:GetBucketLocation"
          ],
          "Resource": [
            "arn:aws:s3:::your-crl-storage-bucket/*",
            "arn:aws:s3:::your-crl-storage-bucket"
          ],
          "Condition": {
            "StringEquals": {
              "aws:SourceAccount": "account",
              "aws:SourceArn": "arn:partition:acm-pca:region:account:certificate-authority/CA_ID"
            }
          }
        }
      ]
    }

    Note: Replace the value for Resource with your Amazon S3 bucket name. Replace the value for aws:SourceAccount with your Account ID. Replace the value for aws:SourceArn with your ARN.

  6. Choose Save changes.

  7. Encrypt your CRLs.

  8. Run the update-certificate-authority command to update the AWS Private CA revocation configuration:

    aws acm-pca update-certificate-authority --certificate-authority-arn Certification_Auhtority_ARN --revocation-configuration file://revoke_config.txt

    Note: Replace Certification_Auhtority_ARN with your ARN.
    The revoke_config.txt file contains revocation information similar to the following:

    {    "CrlConfiguration": {
            "Enabled": <true>,
            "ExpirationInDays": <7>,
            "CustomCname": "example1234.cloudfront.net",
            "S3BucketName": "example-test-crl-bucket-us-east-1",
            "S3ObjectAcl": "BUCKET_OWNER_FULL_CONTROL"
        }
    }

Note:

  • If you turned off the Block Public Access (BPA) feature in Amazon S3, then you can specify either BUCKET_OWNER_FULL_CONTROL or PUBLIC_READ as the value.
  • If you use the AWS Management Console to configure your CRL, then you might receive a "ValidationException" error. Repeat step 8 to update the CA revocation configuration through the AWS CLI.

Related information

Enable S3 Block Public Access (BPA) with CloudFront

Security best practices for Amazon S3

GetBucketAcl