Code Signing for AWS IoT
Developer Guide

PutSigningProfile

The following example shows how to use the PutSigningProfileProfile operation to create a new signing profile. Code signing profiles can then be used in the StartSigningJob operation.

package com.examples; import com.amazonaws.auth.profile.ProfileCredentialsProvider; import com.amazonaws.services.signer.AWSSigner; import com.amazonaws.services.signer.AWSSignerClient; import com.amazonaws.services.signer.model.PutSigningProfileRequest; import com.amazonaws.services.signer.model.SigningMaterial; public class PutSigningProfile { public static void main(String[] s) { final String credentialsProfile = "default"; final String codeSigningProfileName = "MyProfile"; final String codeSigningCertificateArn = "arn:aws:acm:us-west-2:123456789:certificate/6e7e9e0c-0d2a- 4835-b2cc-2326a16c86f0"; // Create a client. final AWSSigner client = AWSSignerClient.builder() .withRegion("us-west-2") .withCredentials(new ProfileCredentialsProvider(credentialsProfile)) .build(); // creating a code signing profile. client.putSigningProfile(new PutSigningProfileRequest() .withProfileName(codeSigningProfileName) .withSigningMaterial(new SigningMaterial() .withCertificateArn(codeSigningCertificateArn)) .withPlatform(platoformArn)); } }