AWSで証明書の情報を取得するコマンドについてのメモ書きです。
対象環境のACMのリストを表示
参考: https://docs.aws.amazon.com/ja_jp/acm/latest/userguide/gs-acm-list.html
コマンド
aws acm list-certificates --profile <credentialsに記載している環境> --no-cli-pager
実行結果
{
"CertificateSummaryList": [
{
"CertificateArn": "arn:aws:acm:region:account:certificate/certificate_ID_1",
"DomainName": "example.com"
},
{
"CertificateArn": "arn:aws:acm:region:account:certificate/certificate_ID_2",
"DomainName": "mydomain.com"
}
]
}
ACMの詳細情報を表示
参考: https://docs.aws.amazon.com/ja_jp/acm/latest/userguide/gs-acm-describe.html
コマンド
aws acm describe-certificate --certificate-arn <確認対象のARN> --profile <credentialsに記載している環境> --no-cli-pager
実行結果
{
"Certificate": {
"CertificateArn": "arn:aws:acm:region:account:certificate/certificate_ID",
"Status": "EXPIRED",
"Options": {
"CertificateTransparencyLoggingPreference": "ENABLED"
},
"SubjectAlternativeNames": [
"example.com",
"www.example.com"
],
"DomainName": "gregpe.com",
"NotBefore": 1450137600.0,
"RenewalEligibility": "INELIGIBLE",
"NotAfter": 1484481600.0,
"KeyAlgorithm": "RSA-2048",
"InUseBy": [
"arn:aws:cloudfront::account:distribution/E12KXPQHVLSYVC"
],
"SignatureAlgorithm": "SHA256WITHRSA",
"CreatedAt": 1450212224.0,
"IssuedAt": 1450212292.0,
"KeyUsages": [
{
"Name": "DIGITAL_SIGNATURE"
},
{
"Name": "KEY_ENCIPHERMENT"
}
],
"Serial": "07:71:71:f4:6b:e7:bf:63:87:e6:ad:3c:b2:0f:d0:5b",
"Issuer": "Amazon",
"Type": "AMAZON_ISSUED",
"ExtendedKeyUsages": [
{
"OID": "1.3.6.1.5.5.7.3.1",
"Name": "TLS_WEB_SERVER_AUTHENTICATION"
},
{
"OID": "1.3.6.1.5.5.7.3.2",
"Name": "TLS_WEB_CLIENT_AUTHENTICATION"
}
],
"DomainValidationOptions": [
{
"ValidationEmails": [
"hostmaster@example.com",
"admin@example.com",
"postmaster@example.com",
"webmaster@example.com",
"administrator@example.com"
],
"ValidationDomain": "example.com",
"DomainName": "example.com"
},
{
"ValidationEmails": [
"hostmaster@example.com",
"admin@example.com",
"postmaster@example.com",
"webmaster@example.com",
"administrator@example.com"
],
"ValidationDomain": "www.example.com",
"DomainName": "www.example.com"
}
],
"Subject": "CN=example.com"
}
}