Skip to content

aws.lightsail.get_certificates

Example SQL Queries

SELECT * FROM
aws.lightsail.get_certificates;

Description

Returns information about one or more Amazon Lightsail SSL/TLS certificates.

To get a summary of a certificate, omit includeCertificateDetails from your request. The response will include only the certificate Amazon Resource Name (ARN), certificate name, domain name, and tags.

Table Definition

Column NameColumn Data Type
certificate_name Input Column

The name for the certificate for which to return information.

When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request is made.

VARCHAR
certificate_statuses Input Column

The status of the certificates for which to return information.

For example, specify ISSUED to return only certificates with an ISSUED status.

When omitted, the response includes all of your certificates in the Amazon Web Services Region where the request is made, regardless of their current status.

VARCHAR[]
Show child fields
certificate_statuses[]
include_certificate_details Input Column

Indicates whether to include detailed information about the certificates in the response.

When omitted, the response includes only the certificate names, Amazon Resource Names (ARNs), domain names, and tags.

BOOLEAN
page_token Input Column

The token to advance to the next page of results from your request.

To get a page token, perform an initial GetCertificates request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
certificates

An object that describes certificates.

STRUCT(
"certificate_arn" VARCHAR,
"certificate_name" VARCHAR,
"domain_name" VARCHAR,
"certificate_detail" STRUCT(
"arn" VARCHAR,
"name" VARCHAR,
"domain_name" VARCHAR,
"status" VARCHAR,
"serial_number" VARCHAR,
"subject_alternative_names" VARCHAR[],
"domain_validation_records" STRUCT(
"domain_name" VARCHAR,
"resource_record" STRUCT(
"name" VARCHAR,
"type" VARCHAR,
"value" VARCHAR
),
"dns_record_creation_state" STRUCT(
"code" VARCHAR,
"message" VARCHAR
),
"validation_status" VARCHAR
)[],
"request_failure_reason" VARCHAR,
"in_use_resource_count" BIGINT,
"key_algorithm" VARCHAR,
"created_at" TIMESTAMP_S,
"issued_at" TIMESTAMP_S,
"issuer_ca" VARCHAR,
"not_before" TIMESTAMP_S,
"not_after" TIMESTAMP_S,
"eligible_to_renew" VARCHAR,
"renewal_summary" STRUCT(
"domain_validation_records" STRUCT(
"domain_name" VARCHAR,
"resource_record" STRUCT(
"name" VARCHAR,
"type" VARCHAR,
"value" VARCHAR
),
"dns_record_creation_state" STRUCT(
"code" VARCHAR,
"message" VARCHAR
),
"validation_status" VARCHAR
)[],
"renewal_status" VARCHAR,
"renewal_status_reason" VARCHAR,
"updated_at" TIMESTAMP_S
),
"revoked_at" TIMESTAMP_S,
"revocation_reason" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"support_code" VARCHAR
),
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
Show child fields
certificates[]
Show child fields
certificates[].certificate_arn

The Amazon Resource Name (ARN) of the certificate.

certificates[].certificate_detail

An object that describes a certificate in detail.

Show child fields
certificates[].certificate_detail.arn

The Amazon Resource Name (ARN) of the certificate.

certificates[].certificate_detail.created_at

The timestamp when the certificate was created.

certificates[].certificate_detail.domain_name

The domain name of the certificate.

certificates[].certificate_detail.domain_validation_records[]
Show child fields
certificates[].certificate_detail.domain_validation_records[].dns_record_creation_state

An object that describes the state of the canonical name (CNAME) records that are automatically added by Lightsail to the DNS of the domain to validate domain ownership.

Show child fields
certificates[].certificate_detail.domain_validation_records[].dns_record_creation_state.code

The status code for the automated DNS record creation.

Following are the possible values:

  • SUCCEEDED - The validation records were successfully added to the domain.

  • STARTED - The automatic DNS record creation has started.

  • FAILED - The validation records failed to be added to the domain.

certificates[].certificate_detail.domain_validation_records[].dns_record_creation_state.message

The message that describes the reason for the status code.

certificates[].certificate_detail.domain_validation_records[].domain_name

The domain name of the certificate validation record. For example, example.com or www.example.com.

certificates[].certificate_detail.domain_validation_records[].resource_record

An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.

Show child fields
certificates[].certificate_detail.domain_validation_records[].resource_record.name

The name of the record.

certificates[].certificate_detail.domain_validation_records[].resource_record.type

The DNS record type.

certificates[].certificate_detail.domain_validation_records[].resource_record.value

The value for the DNS record.

certificates[].certificate_detail.domain_validation_records[].validation_status

The validation status of the record.

certificates[].certificate_detail.eligible_to_renew

The renewal eligibility of the certificate.

certificates[].certificate_detail.in_use_resource_count

The number of Lightsail resources that the certificate is attached to.

certificates[].certificate_detail.issued_at

The timestamp when the certificate was issued.

certificates[].certificate_detail.issuer_ca

The certificate authority that issued the certificate.

certificates[].certificate_detail.key_algorithm

The algorithm used to generate the key pair (the public and private key) of the certificate.

certificates[].certificate_detail.name

The name of the certificate (my-certificate).

certificates[].certificate_detail.not_after

The timestamp when the certificate expires.

certificates[].certificate_detail.not_before

The timestamp when the certificate is first valid.

certificates[].certificate_detail.renewal_summary

An object that describes the status of the certificate renewal managed by Lightsail.

Show child fields
certificates[].certificate_detail.renewal_summary.domain_validation_records[]
Show child fields
certificates[].certificate_detail.renewal_summary.domain_validation_records[].dns_record_creation_state

An object that describes the state of the canonical name (CNAME) records that are automatically added by Lightsail to the DNS of the domain to validate domain ownership.

Show child fields
certificates[].certificate_detail.renewal_summary.domain_validation_records[].dns_record_creation_state.code

The status code for the automated DNS record creation.

Following are the possible values:

  • SUCCEEDED - The validation records were successfully added to the domain.

  • STARTED - The automatic DNS record creation has started.

  • FAILED - The validation records failed to be added to the domain.

certificates[].certificate_detail.renewal_summary.domain_validation_records[].dns_record_creation_state.message

The message that describes the reason for the status code.

certificates[].certificate_detail.renewal_summary.domain_validation_records[].domain_name

The domain name of the certificate validation record. For example, example.com or www.example.com.

certificates[].certificate_detail.renewal_summary.domain_validation_records[].resource_record

An object that describes the DNS records to add to your domain's DNS to validate it for the certificate.

Show child fields
certificates[].certificate_detail.renewal_summary.domain_validation_records[].resource_record.name

The name of the record.

certificates[].certificate_detail.renewal_summary.domain_validation_records[].resource_record.type

The DNS record type.

certificates[].certificate_detail.renewal_summary.domain_validation_records[].resource_record.value

The value for the DNS record.

certificates[].certificate_detail.renewal_summary.domain_validation_records[].validation_status

The validation status of the record.

certificates[].certificate_detail.renewal_summary.renewal_status

The renewal status of the certificate.

The following renewal status are possible:

  • PendingAutoRenewal - Lightsail is attempting to automatically validate the domain names of the certificate. No further action is required.

  • PendingValidation - Lightsail couldn't automatically validate one or more domain names of the certificate. You must take action to validate these domain names or the certificate won't be renewed. Check to make sure your certificate's domain validation records exist in your domain's DNS, and that your certificate remains in use.

  • Success - All domain names in the certificate are validated, and Lightsail renewed the certificate. No further action is required.

  • Failed - One or more domain names were not validated before the certificate expired, and Lightsail did not renew the certificate. You can request a new certificate using the CreateCertificate action.

certificates[].certificate_detail.renewal_summary.renewal_status_reason

The reason for the renewal status of the certificate.

certificates[].certificate_detail.renewal_summary.updated_at

The timestamp when the certificate was last updated.

certificates[].certificate_detail.request_failure_reason

The validation failure reason, if any, of the certificate.

The following failure reasons are possible:

  • NO_AVAILABLE_CONTACTS - This failure applies to email validation, which is not available for Lightsail certificates.

  • ADDITIONAL_VERIFICATION_REQUIRED - Lightsail requires additional information to process this certificate request. This can happen as a fraud-protection measure, such as when the domain ranks within the Alexa top 1000 websites. To provide the required information, use the Amazon Web Services Support Center to contact Amazon Web Services Support.

    You cannot request a certificate for Amazon-owned domain names such as those ending in amazonaws.com, cloudfront.net, or elasticbeanstalk.com.

  • DOMAIN_NOT_ALLOWED - One or more of the domain names in the certificate request was reported as an unsafe domain by VirusTotal. To correct the problem, search for your domain name on the VirusTotal website. If your domain is reported as suspicious, see Google Help for Hacked Websites to learn what you can do.

    If you believe that the result is a false positive, notify the organization that is reporting the domain. VirusTotal is an aggregate of several antivirus and URL scanners and cannot remove your domain from a block list itself. After you correct the problem and the VirusTotal registry has been updated, request a new certificate.

    If you see this error and your domain is not included in the VirusTotal list, visit the Amazon Web Services Support Center and create a case.

  • INVALID_PUBLIC_DOMAIN - One or more of the domain names in the certificate request is not valid. Typically, this is because a domain name in the request is not a valid top-level domain. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request, and ensure that all domain names in the request are for valid top-level domains. For example, you cannot request a certificate for example.invalidpublicdomain because invalidpublicdomain is not a valid top-level domain.

  • OTHER - Typically, this failure occurs when there is a typographical error in one or more of the domain names in the certificate request. Try to request a certificate again, correcting any spelling errors or typos that were in the failed request.

certificates[].certificate_detail.revocation_reason

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

certificates[].certificate_detail.revoked_at

The timestamp when the certificate was revoked. This value is present only when the certificate status is REVOKED.

certificates[].certificate_detail.serial_number

The serial number of the certificate.

certificates[].certificate_detail.status

The validation status of the certificate.

certificates[].certificate_detail.subject_alternative_names[]
certificates[].certificate_detail.support_code

The support code. Include this code in your email to support when you have questions about your Lightsail certificate. This code enables our support team to look up your Lightsail information more easily.

certificates[].certificate_detail.tags[]
Show child fields
certificates[].certificate_detail.tags[].key

The key of the tag.

Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@

certificates[].certificate_detail.tags[].value

The value of the tag.

Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@

certificates[].certificate_name

The name of the certificate.

certificates[].domain_name

The domain name of the certificate.

certificates[].tags[]
Show child fields
certificates[].tags[].key

The key of the tag.

Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@

certificates[].tags[].value

The value of the tag.

Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ :/@

next_page_token

If NextPageToken is returned there are more results available. The value of NextPageToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

VARCHAR