awsdocs / amazon-elasticache-docs

The open source version of the Amazon ElastiCache User Guide. You can submit feedback and requests for changes by submitting issues in this repo or by making proposed changes and submitting a pull request.
Other
26 stars 78 forks source link

Edit accessing-elasticache.md #48

Closed Nethminiromina closed 3 years ago

Nethminiromina commented 3 years ago

Issue:

aws acm import-certificate is not working. It returns an error from --private-key file://easy-rsa/pki/private/server.key.

Description of changes:

I was trying to execute the command to import certificate to ACM. But it returned an error from --private-key file://easy-rsa/pki/private/server.key. The issue was in the command it was file:// instead of fileb://. Once I replace both --private-key file:// and --certificate-chain file:// with fileb:// the command worked.

ERROR:

romina@Rominas-MacBook-Pro % aws acm import-certificate --certificate fileb://easy-rsa/pki/issued/server.crt --private-key file://easy-rsa/pki/private/server.key --certificate-chain file://easy-rsa/pki/ca.crt --region us-west-2

Invalid base64: "-----BEGIN PRIVATE KEY-----
XXXXXXXX
-----END PRIVATE KEY-----
"

FIX:

romina@Rominas-MacBook-Pro % aws acm import-certificate --certificate fileb://easy-rsa/pki/issued/server.crt --private-key fileb://easy-rsa/pki/private/server.key --certificate-chain fileb://easy-rsa/pki/ca.crt --region us-west-2
{
    "CertificateArn": "arn:aws:acm:us-west-2:XXX:certificate/XXX"
}

PS: I was executing the command on macOS

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.