Skip to main content
Skip table of contents

Using iText and AWS KMS to digitally sign a PDF document: Part 4

This example was written for the article "Using iText and AWS KMS to digitally sign a PDF document" and demonstrates signing a PDF with iText using an AWS KMS Key Pair.

Assuming your AWS KMS signing key pair has the alias SigningExamples-ECC_NIST_P256 and is indeed an ECC_NIST_P256 key pair you can use the AwsKmsSignature code from Part 3 to sign a PDF like this:


TestSignSimple

##GITHUB:https://github.com/itext/i7js-signing-examples/blob/develop/aws-kms/src/test/java/com/itextpdf/signingexamples/aws/kms/TestSignSimple.java##


TestSignSimple

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signing-examples.aws-kms-test/iText/SigningExamples/AwsKms/TestSignSimple.cs##

Note: The article assumes that you have stored your credentials in the default section of your ~/.aws/credentials file and your region in the default section of your ~/.aws/config file. Otherwise, you'll have to adapt the KmsClient instantiation or initialization in the code examples written for this article.

For the other examples relating to this article, please see the following links:


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.