Registry / aws / aws-cdk-aws-signer

aws-cdk-aws-signer

JSON →
library1.204.0pypypi✓ verified 85d ago

The `aws-cdk-aws-signer` library provides AWS Cloud Development Kit (CDK) constructs for defining AWS Signer resources. It simplifies the creation and management of signing profiles, allowing you to sign code and artifacts with robust cryptographic integrity. This entry reflects version 1.204.0, part of the CDK v1 series, which typically follows a rapid release cadence with new features and bug fixes.

pip install aws-cdk-aws-signer
INSTALL
IMPORT
SIG · AWS-CDK-AWS-SIGNER
A
aws-cdk-aws-signer
awspythonv1.204.0
Install
3.5s avg
Import
Disk
27MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.204.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 28.6MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.5s · import 0.000s · 29MB
27MB installed
● package 27MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

aws_signer
from aws_cdk import aws_signer
Platform
from aws_cdk.aws_signer import Platform
SigningProfile
from aws_cdk.aws_signer import SigningProfile

This quickstart demonstrates how to define a basic AWS Signer Signing Profile using the `aws-cdk-aws-signer` construct library. It creates a profile suitable for AWS Lambda code signing with a 30-day validity period and exports its ARN.

import aws_cdk as cdk from aws_cdk import aws_signer as signer app = cdk.App() stack = cdk.Stack(app, "MySignerStack") # Create an AWS Signer Signing Profile signing_profile = signer.SigningProfile( stack, "MySigningProfile", platform=signer.Platform.AWS_LAMBDA_SHA384_ECDSA, signature_validity=cdk.Duration.days(30) ) cdk.CfnOutput(stack, "SigningProfileArn", value=signing_profile.signing_profile_arn) app.synth()
Debug
Known issues
breakingThis library (`aws-cdk-aws-signer`) is part of AWS CDK v1. It is not compatible with AWS CDK v2 (`aws-cdk-lib`) out-of-the-box. Attempting to use v1 constructs directly in a v2 application will lead to `ModuleNotFoundError` or `jsii` compatibility issues.
fix
For CDK v2, use the `aws_cdk.aws_signer` module directly from `aws-cdk-lib`. If you must use v1, ensure your project exclusively uses v1 dependencies and syntax. Migration guides exist for moving from CDK v1 to v2.
affects: All 1.x.x versions when used with CDK v2
gotchaAWS Signer is not available in all AWS Regions. Attempting to deploy Signer resources in an unsupported region will result in deployment failures (e.g., 'ResourceNotFoundException' or 'InvalidRegionException').
fix
Consult the AWS Signer documentation for a list of supported regions and ensure your CDK stack is deployed to one of them. You can specify the region when initializing your CDK stack (e.g., `cdk.Stack(app, 'MyStack', env=cdk.Environment(region='us-east-1'))`).
affects: All versions
gotchaThe `platform` property is mandatory for `signer.SigningProfile` and determines the type of code/artifact that can be signed. Using an incorrect platform or omitting it will lead to deployment errors or functional issues.
fix
Always explicitly specify a valid `signer.Platform` when creating a `SigningProfile`, e.g., `platform=signer.Platform.AWS_LAMBDA_SHA384_ECDSA`. Refer to the AWS Signer documentation for available platform IDs.
affects: All 1.x.x versions
gotchaThe `signature_validity` property defines how long a signature created by the profile remains valid. If this duration is too short, signed artifacts might expire prematurely; if too long, it might pose a security risk. The default validity is often not suitable for all use cases.
fix
Always consider and explicitly set `signature_validity` using `cdk.Duration` to match your organizational security policies and operational requirements for signed artifacts.
affects: All 1.x.x versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aws_cdk.aws_signer'
The `aws-cdk-aws-signer` package is not installed, or you are attempting to use CDK v1 imports in a CDK v2 project (where `aws_signer` is part of `aws_cdk_lib.aws_signer`).
fix
Ensure the package is installed: `pip install aws-cdk-aws-signer`. If using CDK v2, change the import to `from aws_cdk_lib import aws_signer` and install `aws-cdk-lib` instead.
jsii.errors.JSIIError: SigningProfile: platform is required
The `platform` property was not provided when instantiating a `SigningProfile` construct, which is a mandatory parameter.
fix
Add the `platform` argument with a valid `signer.Platform` enum value, e.g., `platform=signer.Platform.AWS_LAMBDA_SHA384_ECDSA`.
Failed to create change set for the stack SignerStack: The security token included in the request is invalid.
The AWS credentials configured for CDK deployment lack sufficient permissions to create AWS Signer resources or associated IAM roles.
fix
Ensure the IAM user or role used for CDK deployment has permissions for `signer:*` actions, especially `signer:PutSigningProfile`, `signer:GetSigningProfile`, and `iam:*` for role creation. Review CloudFormation event logs for specific permission failures.
Upgrade
Version history
1.204.0latest on PyPI · released Jun 19, 2023
Audit
Dependencies
aws-cdk.corerequiredThis is a CDK v1 construct library and depends on the core CDK v1 library for its runtime.
Agent activity
22 hits · last 30 days
node
18
OpenAI (training)
2
Resources
aws-cdk-aws-signer — pip install aws-cdk-aws-signer · libregistry