export_certificate¶
Operation¶
export_certificate
async
¶
export_certificate(input: ExportCertificateInput, plugins: list[Plugin] | None = None) -> ExportCertificateOutput
Exports a private certificate issued by a private certificate authority (CA) or a public certificate for use anywhere. The exported file contains the certificate, the certificate chain, and the encrypted private key associated with the public key that is embedded in the certificate. For security, you must assign a passphrase for the private key when exporting it.
For information about exporting and formatting a certificate using the ACM console or CLI, see Export a private certificate and Export a public certificate.
Note
ACM public certificates created prior to June 17, 2025 cannot be exported.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input
|
ExportCertificateInput
|
An instance of |
required |
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
Returns:
| Type | Description |
|---|---|
ExportCertificateOutput
|
An instance of |
Input¶
ExportCertificateInput
dataclass
¶
Bases: _SerdeShape
Dataclass for ExportCertificateInput structure.
Attributes¶
certificate_arn
class-attribute
instance-attribute
¶
certificate_arn: str | None = ...
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
passphrase
class-attribute
instance-attribute
¶
passphrase: bytes | None = ...
Passphrase to associate with the encrypted exported private key.
Note
When creating your passphrase, you can use any ASCII character except #, $, or %.
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. After entering the command, you are prompted for the passphrase.
openssl rsa -in encrypted_key.pem -out decrypted_key.pem
Output¶
ExportCertificateOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for ExportCertificateOutput structure.
Attributes¶
certificate
class-attribute
instance-attribute
¶
certificate: str | None = ...
The base64 PEM-encoded certificate.
certificate_chain
class-attribute
instance-attribute
¶
certificate_chain: str | None = ...
The base64 PEM-encoded certificate chain. This does not include the certificate that you are exporting.
private_key
class-attribute
instance-attribute
¶
private_key: str | None = ...
The encrypted private key associated with the public key in the certificate. The key is output in PKCS #8 format and is base64 PEM-encoded.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.