Aws-cli: getting a certificate in the correct format

Created on 6 Oct 2017  路  3Comments  路  Source: aws/aws-cli

Description

Right now I can get the certification like so aws iam get-server-certificate --server-certificate-name certificateName

would like to be able to grab the cert without having to use openssl to -text -noout

the work flow now I have is to format the query

aws iam get-server-certificate --server-certificate-name certificateName --query "ServerCertificate.CertificateBody" | awk 'gsub(/"/,"",s); {gsub(/\\n/,"\n")}1' > cert.crt

then use openssl x509 -in cert.cert -text -noout

automation-exempt feature-request

Most helpful comment

Marking as a feature request. In the meantime, you can use --output text to remove the need for the awk command:

$ aws iam get-server-certificate \
        --server-certificate-name certificateName \
        --query ServerCertificate.CertificateBody \
        --output text | openssl x509 -text -noout

All 3 comments

Marking as a feature request. In the meantime, you can use --output text to remove the need for the awk command:

$ aws iam get-server-certificate \
        --server-certificate-name certificateName \
        --query ServerCertificate.CertificateBody \
        --output text | openssl x509 -text -noout

Good Morning!

We're closing this issue here on GitHub, as part of our migration to UserVoice for feature requests involving the AWS CLI.

This will let us get the most important features to you, by making it easier to search for and show support for the features you care the most about, without diluting the conversation with bug reports.

As a quick UserVoice primer (if not already familiar): after an idea is posted, people can vote on the ideas, and the product team will be responding directly to the most popular suggestions.

We鈥檝e imported existing feature requests from GitHub - Search for this issue there!

And don't worry, this issue will still exist on GitHub for posterity's sake. As it鈥檚 a text-only import of the original post into UserVoice, we鈥檒l still be keeping in mind the comments and discussion that already exist here on the GitHub issue.

GitHub will remain the channel for reporting bugs.

Once again, this issue can now be found by searching for the title on: https://aws.uservoice.com/forums/598381-aws-command-line-interface

-The AWS SDKs & Tools Team

Based on community feedback, we have decided to return feature requests to GitHub issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vadimkim picture vadimkim  路  3Comments

alexejk picture alexejk  路  3Comments

rahul003 picture rahul003  路  3Comments

ronaldpetty picture ronaldpetty  路  3Comments

ikim23 picture ikim23  路  3Comments