ImportCertificateAuthorityCertificate - AWS Private Certificate Authority


Imports a signed private CA certificate into AWS Private CA. This action is used when you are using a chain of trust whose root is located outside AWS Private CA. Before you can call this action, the following preparations must in place:

  1. In AWS Private CA, call the CreateCertificateAuthority action to create the private CA that you plan to back with the imported certificate.

  2. Call the GetCertificateAuthorityCsr action to generate a certificate signing request (CSR).

  3. Sign the CSR using a root or intermediate CA hosted by either an on-premises PKI hierarchy or by a commercial CA.

  4. Create a certificate chain and copy the signed certificate and the certificate chain to your working directory.

AWS Private CA supports three scenarios for installing a CA certificate:

  • Installing a certificate for a root CA hosted by AWS Private CA.

  • Installing a subordinate CA certificate whose parent authority is hosted by AWS Private CA.

  • Installing a subordinate CA certificate whose parent authority is externally hosted.

The following additional requirements apply when you import a CA certificate.

  • Only a self-signed certificate can be imported as a root CA.

  • A self-signed certificate cannot be imported as a subordinate CA.

  • Your certificate chain must not include the private CA certificate that you are importing.

  • Your root CA must be the last certificate in your chain. The subordinate certificate, if any, that your root CA signed must be next to last. The subordinate certificate signed by the preceding subordinate CA must come next, and so on until your chain is built.

  • The chain must be PEM-encoded.

  • The maximum allowed size of a certificate is 32 KB.

  • The maximum allowed size of a certificate chain is 2 MB.

Enforcement of Critical Constraints

AWS Private CA allows the following extensions to be marked critical in the imported CA certificate or chain.

  • Basic constraints (must be marked critical)

  • Subject alternative names

  • Key usage

  • Extended key usage

  • Authority key identifier

  • Subject key identifier

  • Issuer alternative name

  • Subject directory attributes

  • Subject information access

  • Certificate policies

  • Policy mappings

  • Inhibit anyPolicy

AWS Private CA rejects the following extensions when they are marked critical in an imported CA certificate or chain.

  • Name constraints

  • Policy constraints

  • CRL distribution points

  • Authority information access

  • Freshest CRL

  • Any other extension

Request Syntax

{ "Certificate": blob, "CertificateAuthorityArn": "string", "CertificateChain": blob }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


The PEM-encoded certificate for a private CA. This may be a self-signed certificate in the case of a root CA, or it may be signed by another CA that you control.

Type: Base64-encoded binary data object

Length Constraints: Minimum length of 1. Maximum length of 32768.

Required: Yes


The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority. This must be of the form:


Type: String

Length Constraints: Minimum length of 5. Maximum length of 200.

Pattern: arn:[\w+=/,.@-]+:acm-pca:[\w+=/,.@-]*:[0-9]*:[\w+=,.@-]+(/[\w+=,.@-]+)*

Required: Yes


A PEM-encoded file that contains all of your certificates, other than the certificate you're importing, chaining up to your root CA. Your AWS Private CA-hosted or on-premises root certificate is the last in the chain, and each certificate in the chain signs the one preceding.

This parameter must be supplied when you import a subordinate CA. When you import a root CA, there is no chain.

Type: Base64-encoded binary data object

Length Constraints: Minimum length of 0. Maximum length of 2097152.

Required: No

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.


For information about the errors that are common to all actions, see Common Errors.


The certificate authority certificate you are importing does not comply with conditions specified in the certificate that signed it.

HTTP Status Code: 400


A previous update to your private CA is still ongoing.

HTTP Status Code: 400


The requested Amazon Resource Name (ARN) does not refer to an existing resource.

HTTP Status Code: 400


The request action cannot be performed or is prohibited.

HTTP Status Code: 400


The state of the private CA does not allow this action to occur.

HTTP Status Code: 400


One or more fields in the certificate are invalid.

HTTP Status Code: 400


The request has failed for an unspecified reason.

HTTP Status Code: 400


Your request is already in progress.

HTTP Status Code: 400


A resource such as a private CA, S3 bucket, certificate, audit report, or policy cannot be found.

HTTP Status Code: 400



This example illustrates one usage of ImportCertificateAuthorityCertificate.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity Content-Length: 3375 X-Amz-Target: ACMPrivateCA.ImportCertificateAuthorityCertificate X-Amz-Date: 20180226T203302Z User-Agent: aws-cli/1.14.28 Python/2.7.9 Windows/8 botocore/1.8.32 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AWS_Access_Key_ID/20180226/AWS_Region/acm-pca/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=cdf100cc3972f9df2e0f94295a6e378fbac8c1f489363689805504450e605d83 { "CertificateChain": "base64-encoded certificate chain", "Certificate": "base64-encoded certificate", "CertificateAuthorityArn": "arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012" }


This example illustrates one usage of ImportCertificateAuthorityCertificate.

Sample Response

This function does not return a value.

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: