CreateCertificateAuthority - ACM Private CA


Creates a root or subordinate private certificate authority (CA). You must specify the CA configuration, an optional configuration for Online Certificate Status Protocol (OCSP) and/or a certificate revocation list (CRL), the CA type, and an optional idempotency token to avoid accidental creation of multiple CAs. The CA configuration specifies the name of the algorithm and key size to be used to create the CA private key, the type of signing algorithm that the CA uses, and X.500 subject information. The OCSP configuration can optionally specify a custom URL for the OCSP responder. The CRL configuration specifies the CRL expiration period in days (the validity period of the CRL), the Amazon S3 bucket that will contain the CRL, and a CNAME alias for the S3 bucket that is included in certificates issued by the CA. If successful, this action returns the Amazon Resource Name (ARN) of the CA.

ACM Private CA assets that are stored in Amazon S3 can be protected with encryption. For more information, see Encrypting Your CRLs.


Both PCA and the IAM principal must have permission to write to the S3 bucket that you specify. If the IAM principal making the call does not have permission to write to the bucket, then an exception is thrown. For more information, see Access policies for CRLs in Amazon S3.

Request Syntax

{ "CertificateAuthorityConfiguration": { "CsrExtensions": { "KeyUsage": { "CRLSign": boolean, "DataEncipherment": boolean, "DecipherOnly": boolean, "DigitalSignature": boolean, "EncipherOnly": boolean, "KeyAgreement": boolean, "KeyCertSign": boolean, "KeyEncipherment": boolean, "NonRepudiation": boolean }, "SubjectInformationAccess": [ { "AccessLocation": { "DirectoryName": { "CommonName": "string", "Country": "string", "CustomAttributes": [ { "ObjectIdentifier": "string", "Value": "string" } ], "DistinguishedNameQualifier": "string", "GenerationQualifier": "string", "GivenName": "string", "Initials": "string", "Locality": "string", "Organization": "string", "OrganizationalUnit": "string", "Pseudonym": "string", "SerialNumber": "string", "State": "string", "Surname": "string", "Title": "string" }, "DnsName": "string", "EdiPartyName": { "NameAssigner": "string", "PartyName": "string" }, "IpAddress": "string", "OtherName": { "TypeId": "string", "Value": "string" }, "RegisteredId": "string", "Rfc822Name": "string", "UniformResourceIdentifier": "string" }, "AccessMethod": { "AccessMethodType": "string", "CustomObjectIdentifier": "string" } } ] }, "KeyAlgorithm": "string", "SigningAlgorithm": "string", "Subject": { "CommonName": "string", "Country": "string", "CustomAttributes": [ { "ObjectIdentifier": "string", "Value": "string" } ], "DistinguishedNameQualifier": "string", "GenerationQualifier": "string", "GivenName": "string", "Initials": "string", "Locality": "string", "Organization": "string", "OrganizationalUnit": "string", "Pseudonym": "string", "SerialNumber": "string", "State": "string", "Surname": "string", "Title": "string" } }, "CertificateAuthorityType": "string", "IdempotencyToken": "string", "KeyStorageSecurityStandard": "string", "RevocationConfiguration": { "CrlConfiguration": { "CustomCname": "string", "Enabled": boolean, "ExpirationInDays": number, "S3BucketName": "string", "S3ObjectAcl": "string" }, "OcspConfiguration": { "Enabled": boolean, "OcspCustomCname": "string" } }, "Tags": [ { "Key": "string", "Value": "string" } ] }

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.


Name and bit size of the private key algorithm, the name of the signing algorithm, and X.500 certificate subject information.

Type: CertificateAuthorityConfiguration object

Required: Yes


The type of the certificate authority.

Type: String


Required: Yes


Custom string that can be used to distinguish between calls to the CreateCertificateAuthority action. Idempotency tokens for CreateCertificateAuthority time out after five minutes. Therefore, if you call CreateCertificateAuthority multiple times with the same idempotency token within five minutes, ACM Private CA recognizes that you are requesting only certificate authority and will issue only one. If you change the idempotency token for each call, PCA recognizes that you are requesting multiple certificate authorities.

Type: String

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

Pattern: [\u0009\u000A\u000D\u0020-\u00FF]*

Required: No


Specifies a cryptographic key management compliance standard used for handling CA keys.

Default: FIPS_140_2_LEVEL_3_OR_HIGHER

Note: FIPS_140_2_LEVEL_3_OR_HIGHER is not supported in the following Regions:

  • ap-northeast-3

  • ap-southeast-3

When creating a CA in these Regions, you must provide FIPS_140_2_LEVEL_2_OR_HIGHER as the argument for KeyStorageSecurityStandard. Failure to do this results in an InvalidArgsException with the message, "A certificate authority cannot be created in this region with the specified security standard."

Type: String

Valid Values: FIPS_140_2_LEVEL_2_OR_HIGHER | FIPS_140_2_LEVEL_3_OR_HIGHER

Required: No


Contains information to enable Online Certificate Status Protocol (OCSP) support, to enable a certificate revocation list (CRL), to enable both, or to enable neither. The default is for both certificate validation mechanisms to be disabled. For more information, see the OcspConfiguration and CrlConfiguration types.

Type: RevocationConfiguration object

Required: No


Key-value pairs that will be attached to the new private CA. You can associate up to 50 tags with a private CA. For information using tags with IAM to manage permissions, see Controlling Access Using IAM Tags.

Type: Array of Tag objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Required: No

Response Syntax

{ "CertificateAuthorityArn": "string" }

Response Elements

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

The following data is returned in JSON format by the service.


If successful, the Amazon Resource Name (ARN) of the certificate authority (CA). This is of the form:

arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012 .

Type: String

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

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


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


One or more of the specified arguments was not valid.

HTTP Status Code: 400


The resource policy is invalid or is missing a required statement. For general information about IAM policy and statement structure, see Overview of JSON Policies.

HTTP Status Code: 400


The tag associated with the CA is not valid. The invalid argument is contained in the message field.

HTTP Status Code: 400


An ACM Private CA quota has been exceeded. See the exception message returned to determine the quota that was exceeded.

HTTP Status Code: 400



This example illustrates one usage of CreateCertificateAuthority.

Sample Request

POST / HTTP/1.1 Host: Accept-Encoding: identity Content-Length: 512 X-Amz-Target: ACMPrivateCA.CreateCertificateAuthority X-Amz-Date: 20210310T165448Z User-Agent: aws-cli/1.15.4 Python/2.7.9 Windows/8 botocore/1.10.4 Content-Type: application/x-amz-json-1.1 Authorization: AWS4-HMAC-SHA256 Credential=AWS_Access_Key_ID/20180515/AWS_Region/acm-pca/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=6fc58aaf789659cb4e0dd0ba484a2562d982b6b8edd56ea0c5c94c2af9aeafbe { "IdempotencyToken":"98256344", "CertificateAuthorityConfiguration":{ "KeyAlgorithm":"RSA_2048", "SigningAlgorithm":"SHA256WITHRSA", "Subject":{ "Locality":"Seattle", "Country":"US", "CommonName":"", "State":"WA", "Organization":"Example Ltd.", "OrganizationalUnit":"Corporate" } }, "CertificateAuthorityType":"SUBORDINATE", "RevocationConfiguration":{ "CrlConfiguration":{ "CustomCname":"CRL", "Enabled":true, "ExpirationInDays":7, "S3BucketName":"my-bucket" }, "OcspConfiguration":{ "Enabled":false } } }


This example illustrates one usage of CreateCertificateAuthority.

Sample Response

HTTP/1.1 200 OK Date: Tue, 10 March 2021 16:54:56 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 127 x-amzn-RequestId: eacb346a-d80b-4be6-a1b2-1732c3ae3c38 Connection: keep-alive { "CertificateAuthorityArn": "arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012" }

See Also

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