AWS Certificate Manager

2018/04/04 - AWS Certificate Manager - 1 new 2 updated api methods

Changes  AWS Certificate Manager has added support for AWS Certificate Manager Private Certificate Authority (CA). Customers can now request private certificates with the RequestCertificate API, and also export private certificates with the ExportCertificate API.

ExportCertificate (new) Link ¶

Exports a certificate for use anywhere. You can export the certificate, the certificate chain, and the encrypted private key associated with the public key embedded in the certificate. You must store the private key securely. The private key is a 2048 bit RSA key. You must provide a passphrase for the private key when exporting it. You can use the following OpenSSL command to decrypt it later. Provide the passphrase when prompted.

openssl rsa -in encrypted_key.pem -out decrypted_key.pem

See also: AWS API Documentation

Request Syntax

client.export_certificate(
    CertificateArn='string',
    Passphrase=b'bytes'
)
type CertificateArn

string

param CertificateArn

[REQUIRED]

An Amazon Resource Name (ARN) of the issued certificate. This must be of the form:

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

type Passphrase

bytes

param Passphrase

[REQUIRED]

Passphrase to associate with the encrypted exported private key. If you want to later decrypt the private key, you must have the passphrase. You can use the following OpenSSL command to decrypt a private key:

openssl rsa -in encrypted_key.pem -out decrypted_key.pem

rtype

dict

returns

Response Syntax

{
    'Certificate': 'string',
    'CertificateChain': 'string',
    'PrivateKey': 'string'
}

Response Structure

  • (dict) --

    • Certificate (string) --

      The base64 PEM-encoded certificate.

    • CertificateChain (string) --

      The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.

    • PrivateKey (string) --

      The PEM-encoded private key associated with the public key in the certificate.

DescribeCertificate (updated) Link ¶
Changes (response)
{'Certificate': {'CertificateAuthorityArn': 'string',
                 'FailureReason': {'PCA_INVALID_ARGS',
                                   'PCA_INVALID_ARN',
                                   'PCA_INVALID_STATE',
                                   'PCA_LIMIT_EXCEEDED',
                                   'PCA_REQUEST_FAILED',
                                   'PCA_RESOURCE_NOT_FOUND'},
                 'RenewalEligibility': 'ELIGIBLE | INELIGIBLE',
                 'Type': {'PRIVATE'}}}

Returns detailed metadata about the specified ACM certificate.

See also: AWS API Documentation

Request Syntax

client.describe_certificate(
    CertificateArn='string'
)
type CertificateArn

string

param CertificateArn

[REQUIRED]

The Amazon Resource Name (ARN) of the ACM certificate. The ARN must have the following form:

arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012

For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

rtype

dict

returns

Response Syntax

{
    'Certificate': {
        'CertificateArn': 'string',
        'DomainName': 'string',
        'SubjectAlternativeNames': [
            'string',
        ],
        'DomainValidationOptions': [
            {
                'DomainName': 'string',
                'ValidationEmails': [
                    'string',
                ],
                'ValidationDomain': 'string',
                'ValidationStatus': 'PENDING_VALIDATION'|'SUCCESS'|'FAILED',
                'ResourceRecord': {
                    'Name': 'string',
                    'Type': 'CNAME',
                    'Value': 'string'
                },
                'ValidationMethod': 'EMAIL'|'DNS'
            },
        ],
        'Serial': 'string',
        'Subject': 'string',
        'Issuer': 'string',
        'CreatedAt': datetime(2015, 1, 1),
        'IssuedAt': datetime(2015, 1, 1),
        'ImportedAt': datetime(2015, 1, 1),
        'Status': 'PENDING_VALIDATION'|'ISSUED'|'INACTIVE'|'EXPIRED'|'VALIDATION_TIMED_OUT'|'REVOKED'|'FAILED',
        'RevokedAt': datetime(2015, 1, 1),
        'RevocationReason': 'UNSPECIFIED'|'KEY_COMPROMISE'|'CA_COMPROMISE'|'AFFILIATION_CHANGED'|'SUPERCEDED'|'CESSATION_OF_OPERATION'|'CERTIFICATE_HOLD'|'REMOVE_FROM_CRL'|'PRIVILEGE_WITHDRAWN'|'A_A_COMPROMISE',
        'NotBefore': datetime(2015, 1, 1),
        'NotAfter': datetime(2015, 1, 1),
        'KeyAlgorithm': 'RSA_2048'|'RSA_1024'|'RSA_4096'|'EC_prime256v1'|'EC_secp384r1'|'EC_secp521r1',
        'SignatureAlgorithm': 'string',
        'InUseBy': [
            'string',
        ],
        'FailureReason': 'NO_AVAILABLE_CONTACTS'|'ADDITIONAL_VERIFICATION_REQUIRED'|'DOMAIN_NOT_ALLOWED'|'INVALID_PUBLIC_DOMAIN'|'CAA_ERROR'|'PCA_LIMIT_EXCEEDED'|'PCA_INVALID_ARN'|'PCA_INVALID_STATE'|'PCA_REQUEST_FAILED'|'PCA_RESOURCE_NOT_FOUND'|'PCA_INVALID_ARGS'|'OTHER',
        'Type': 'IMPORTED'|'AMAZON_ISSUED'|'PRIVATE',
        'RenewalSummary': {
            'RenewalStatus': 'PENDING_AUTO_RENEWAL'|'PENDING_VALIDATION'|'SUCCESS'|'FAILED',
            'DomainValidationOptions': [
                {
                    'DomainName': 'string',
                    'ValidationEmails': [
                        'string',
                    ],
                    'ValidationDomain': 'string',
                    'ValidationStatus': 'PENDING_VALIDATION'|'SUCCESS'|'FAILED',
                    'ResourceRecord': {
                        'Name': 'string',
                        'Type': 'CNAME',
                        'Value': 'string'
                    },
                    'ValidationMethod': 'EMAIL'|'DNS'
                },
            ]
        },
        'KeyUsages': [
            {
                'Name': 'DIGITAL_SIGNATURE'|'NON_REPUDIATION'|'KEY_ENCIPHERMENT'|'DATA_ENCIPHERMENT'|'KEY_AGREEMENT'|'CERTIFICATE_SIGNING'|'CRL_SIGNING'|'ENCIPHER_ONLY'|'DECIPHER_ONLY'|'ANY'|'CUSTOM'
            },
        ],
        'ExtendedKeyUsages': [
            {
                'Name': 'TLS_WEB_SERVER_AUTHENTICATION'|'TLS_WEB_CLIENT_AUTHENTICATION'|'CODE_SIGNING'|'EMAIL_PROTECTION'|'TIME_STAMPING'|'OCSP_SIGNING'|'IPSEC_END_SYSTEM'|'IPSEC_TUNNEL'|'IPSEC_USER'|'ANY'|'NONE'|'CUSTOM',
                'OID': 'string'
            },
        ],
        'CertificateAuthorityArn': 'string',
        'RenewalEligibility': 'ELIGIBLE'|'INELIGIBLE',
        'Options': {
            'CertificateTransparencyLoggingPreference': 'ENABLED'|'DISABLED'
        }
    }
}

Response Structure

  • (dict) --

    • Certificate (dict) --

      Metadata about an ACM certificate.

      • CertificateArn (string) --

        The Amazon Resource Name (ARN) of the certificate. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .

      • DomainName (string) --

        The fully qualified domain name for the certificate, such as www.example.com or example.com.

      • SubjectAlternativeNames (list) --

        One or more domain names (subject alternative names) included in the certificate. This list contains the domain names that are bound to the public key that is contained in the certificate. The subject alternative names include the canonical domain name (CN) of the certificate and additional domain names that can be used to connect to the website.

        • (string) --

      • DomainValidationOptions (list) --

        Contains information about the initial validation of each domain name that occurs as a result of the RequestCertificate request. This field exists only when the certificate type is AMAZON_ISSUED .

        • (dict) --

          Contains information about the validation of each domain name in the certificate.

          • DomainName (string) --

            A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com .

          • ValidationEmails (list) --

            A list of email addresses that ACM used to send domain validation emails.

            • (string) --

          • ValidationDomain (string) --

            The domain name that ACM used to send domain validation emails.

          • ValidationStatus (string) --

            The validation status of the domain name. This can be one of the following values:

            • PENDING_VALIDATION

            • SUCCESS

            • FAILED

          • ResourceRecord (dict) --

            Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain Ownership.

            • Name (string) --

              The name of the DNS record to create in your domain. This is supplied by ACM.

            • Type (string) --

              The type of DNS record. Currently this can be CNAME .

            • Value (string) --

              The value of the CNAME record to add to your DNS database. This is supplied by ACM.

          • ValidationMethod (string) --

            Specifies the domain validation method.

      • Serial (string) --

        The serial number of the certificate.

      • Subject (string) --

        The name of the entity that is associated with the public key contained in the certificate.

      • Issuer (string) --

        The name of the certificate authority that issued and signed the certificate.

      • CreatedAt (datetime) --

        The time at which the certificate was requested. This value exists only when the certificate type is AMAZON_ISSUED .

      • IssuedAt (datetime) --

        The time at which the certificate was issued. This value exists only when the certificate type is AMAZON_ISSUED .

      • ImportedAt (datetime) --

        The date and time at which the certificate was imported. This value exists only when the certificate type is IMPORTED .

      • Status (string) --

        The status of the certificate.

      • RevokedAt (datetime) --

        The time at which the certificate was revoked. This value exists only when the certificate status is REVOKED .

      • RevocationReason (string) --

        The reason the certificate was revoked. This value exists only when the certificate status is REVOKED .

      • NotBefore (datetime) --

        The time before which the certificate is not valid.

      • NotAfter (datetime) --

        The time after which the certificate is not valid.

      • KeyAlgorithm (string) --

        The algorithm that was used to generate the public-private key pair.

      • SignatureAlgorithm (string) --

        The algorithm that was used to sign the certificate.

      • InUseBy (list) --

        A list of ARNs for the AWS resources that are using the certificate. A certificate can be used by multiple AWS resources.

        • (string) --

      • FailureReason (string) --

        The reason the certificate request failed. This value exists only when the certificate status is FAILED . For more information, see Certificate Request Failed in the AWS Certificate Manager User Guide .

      • Type (string) --

        The source of the certificate. For certificates provided by ACM, this value is AMAZON_ISSUED . For certificates that you imported with ImportCertificate, this value is IMPORTED . ACM does not provide managed renewal for imported certificates. For more information about the differences between certificates that you import and those that ACM provides, see Importing Certificates in the AWS Certificate Manager User Guide .

      • RenewalSummary (dict) --

        Contains information about the status of ACM's managed renewal for the certificate. This field exists only when the certificate type is AMAZON_ISSUED .

        • RenewalStatus (string) --

          The status of ACM's managed renewal of the certificate.

        • DomainValidationOptions (list) --

          Contains information about the validation of each domain name in the certificate, as it pertains to ACM's managed renewal. This is different from the initial validation that occurs as a result of the RequestCertificate request. This field exists only when the certificate type is AMAZON_ISSUED .

          • (dict) --

            Contains information about the validation of each domain name in the certificate.

            • DomainName (string) --

              A fully qualified domain name (FQDN) in the certificate. For example, www.example.com or example.com .

            • ValidationEmails (list) --

              A list of email addresses that ACM used to send domain validation emails.

              • (string) --

            • ValidationDomain (string) --

              The domain name that ACM used to send domain validation emails.

            • ValidationStatus (string) --

              The validation status of the domain name. This can be one of the following values:

              • PENDING_VALIDATION

              • SUCCESS

              • FAILED

            • ResourceRecord (dict) --

              Contains the CNAME record that you add to your DNS database for domain validation. For more information, see Use DNS to Validate Domain Ownership.

              • Name (string) --

                The name of the DNS record to create in your domain. This is supplied by ACM.

              • Type (string) --

                The type of DNS record. Currently this can be CNAME .

              • Value (string) --

                The value of the CNAME record to add to your DNS database. This is supplied by ACM.

            • ValidationMethod (string) --

              Specifies the domain validation method.

      • KeyUsages (list) --

        A list of Key Usage X.509 v3 extension objects. Each object is a string value that identifies the purpose of the public key contained in the certificate. Possible extension values include DIGITAL_SIGNATURE, KEY_ENCHIPHERMENT, NON_REPUDIATION, and more.

        • (dict) --

          The Key Usage X.509 v3 extension defines the purpose of the public key contained in the certificate.

          • Name (string) --

            A string value that contains a Key Usage extension name.

      • ExtendedKeyUsages (list) --

        Contains a list of Extended Key Usage X.509 v3 extension objects. Each object specifies a purpose for which the certificate public key can be used and consists of a name and an object identifier (OID).

        • (dict) --

          The Extended Key Usage X.509 v3 extension defines one or more purposes for which the public key can be used. This is in addition to or in place of the basic purposes specified by the Key Usage extension.

          • Name (string) --

            The name of an Extended Key Usage value.

          • OID (string) --

            An object identifier (OID) for the extension value. OIDs are strings of numbers separated by periods. The following OIDs are defined in RFC 3280 and RFC 5280.

            • 1.3.6.1.5.5.7.3.1 (TLS_WEB_SERVER_AUTHENTICATION)

            • 1.3.6.1.5.5.7.3.2 (TLS_WEB_CLIENT_AUTHENTICATION)

            • 1.3.6.1.5.5.7.3.3 (CODE_SIGNING)

            • 1.3.6.1.5.5.7.3.4 (EMAIL_PROTECTION)

            • 1.3.6.1.5.5.7.3.8 (TIME_STAMPING)

            • 1.3.6.1.5.5.7.3.9 (OCSP_SIGNING)

            • 1.3.6.1.5.5.7.3.5 (IPSEC_END_SYSTEM)

            • 1.3.6.1.5.5.7.3.6 (IPSEC_TUNNEL)

            • 1.3.6.1.5.5.7.3.7 (IPSEC_USER)

      • CertificateAuthorityArn (string) --

        The Amazon Resource Name (ARN) of the ACM PCA private certificate authority (CA) that issued the certificate. This has the following format:

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

      • RenewalEligibility (string) --

        Specifies whether the certificate is eligible for renewal.

      • Options (dict) --

        Value that specifies whether to add the certificate to a transparency log. Certificate transparency makes it possible to detect SSL certificates that have been mistakenly or maliciously issued. A browser might respond to certificate that has not been logged by showing an error message. The logs are cryptographically secure.

        • CertificateTransparencyLoggingPreference (string) --

          You can opt out of certificate transparency logging by specifying the DISABLED option. Opt in by specifying ENABLED .

RequestCertificate (updated) Link ¶
Changes (request)
{'CertificateAuthorityArn': 'string'}

Requests an ACM certificate for use with other AWS services. To request an ACM certificate, you must specify the fully qualified domain name (FQDN) for your site in the DomainName parameter. You can also specify additional FQDNs in the SubjectAlternativeNames parameter.

Each domain name that you specify must be validated to verify that you own or control the domain. You can use DNS validation or email validation. We recommend that you use DNS validation.

If you choose email validation, email is sent to the domain owner to request approval to issue the certificate. Email is sent to three registered contact addresses in the WHOIS database and to five common system administration addresses formed from the DomainName you enter or the optional ValidationDomain parameter. For more information, see Validate with Email.

After receiving approval from the domain owner, the ACM certificate is issued.

See also: AWS API Documentation

Request Syntax

client.request_certificate(
    DomainName='string',
    ValidationMethod='EMAIL'|'DNS',
    SubjectAlternativeNames=[
        'string',
    ],
    IdempotencyToken='string',
    DomainValidationOptions=[
        {
            'DomainName': 'string',
            'ValidationDomain': 'string'
        },
    ],
    Options={
        'CertificateTransparencyLoggingPreference': 'ENABLED'|'DISABLED'
    },
    CertificateAuthorityArn='string'
)
type DomainName

string

param DomainName

[REQUIRED]

Fully qualified domain name (FQDN), such as www.example.com, of the site that you want to secure with an ACM Certificate. Use an asterisk (*) to create a wildcard certificate that protects several sites in the same domain. For example, *.example.com protects www.example.com, site.example.com, and images.example.com.

The first domain name you enter cannot exceed 63 octets, including periods. Each subsequent Subject Alternative Name (SAN), however, can be up to 253 octets in length.

type ValidationMethod

string

param ValidationMethod

The method you want to use to validate that you own or control domain. You can validate with DNS or validate with email. We recommend that you use DNS validation.

type SubjectAlternativeNames

list

param SubjectAlternativeNames

Additional FQDNs to be included in the Subject Alternative Name extension of the ACM certificate. For example, add the name www.example.net to a certificate for which the DomainName field is www.example.com if users can reach your site by using either name. The maximum number of domain names that you can add to an ACM certificate is 100. However, the initial limit is 10 domain names. If you need more than 10 names, you must request a limit increase. For more information, see Limits.

The maximum length of a SAN DNS name is 253 octets. The name is made up of multiple labels separated by periods. No label can be longer than 63 octets. Consider the following examples:

  • (63 octets).(63 octets).(63 octets).(61 octets) is legal because the total length is 253 octets (63+1+63+1+63+1+61) and no label exceeds 63 octets.

  • (64 octets).(63 octets).(63 octets).(61 octets) is not legal because the total length exceeds 253 octets (64+1+63+1+63+1+61) and the first label exceeds 63 octets.

  • (63 octets).(63 octets).(63 octets).(62 octets) is not legal because the total length of the DNS name (63+1+63+1+63+1+62) exceeds 253 octets.

  • (string) --

type IdempotencyToken

string

param IdempotencyToken

Customer chosen string that can be used to distinguish between calls to RequestCertificate . Idempotency tokens time out after one hour. Therefore, if you call RequestCertificate multiple times with the same idempotency token within one hour, ACM recognizes that you are requesting only one certificate and will issue only one. If you change the idempotency token for each call, ACM recognizes that you are requesting multiple certificates.

type DomainValidationOptions

list

param DomainValidationOptions

The domain name that you want ACM to use to send you emails so that you can validate domain ownership.

  • (dict) --

    Contains information about the domain names that you want ACM to use to send you emails that enable you to validate domain ownership.

    • DomainName (string) -- [REQUIRED]

      A fully qualified domain name (FQDN) in the certificate request.

    • ValidationDomain (string) -- [REQUIRED]

      The domain name that you want ACM to use to send you validation emails. This domain name is the suffix of the email addresses that you want ACM to use. This must be the same as the DomainName value or a superdomain of the DomainName value. For example, if you request a certificate for testing.example.com , you can specify example.com for this value. In that case, ACM sends domain validation emails to the following five addresses:

type Options

dict

param Options

Currently, you can use this parameter to specify whether to add the certificate to a certificate transparency log. Certificate transparency makes it possible to detect SSL/TLS certificates that have been mistakenly or maliciously issued. Certificates that have not been logged typically produce an error message in a browser. For more information, see Opting Out of Certificate Transparency Logging.

  • CertificateTransparencyLoggingPreference (string) --

    You can opt out of certificate transparency logging by specifying the DISABLED option. Opt in by specifying ENABLED .

type CertificateAuthorityArn

string

param CertificateAuthorityArn

The Amazon Resource Name (ARN) of the private certificate authority (CA) that will be used to issue the certificate. For more information about private CAs, see the AWS Certificate Manager Private Certificate Authority (PCA) user guide. The ARN must have the following form:

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

rtype

dict

returns

Response Syntax

{
    'CertificateArn': 'string'
}

Response Structure

  • (dict) --

    • CertificateArn (string) --

      String that contains the ARN of the issued certificate. This must be of the form:

      arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012