Registry / aws / aws-cdk-aws-codestar-alpha

aws-cdk-aws-codestar-alpha

JSON →
library2.259.0a0pypypi✓ verified 85d ago

The `aws-cdk-aws-codestar-alpha` library provides AWS Cloud Development Kit (CDK) constructs for interacting with AWS CodeStar. As an 'alpha' module, its APIs are subject to breaking changes and are not recommended for production use. It is currently at version `2.250.0a0` and follows the rapid release cadence of the AWS CDK v2.

pip install aws-cdk-aws-codestar-alpha
INSTALL
IMPORT
SIG · AWS-CDK-AWS-CODEST
A
aws-cdk-aws-codestar-alpha
awspythonv2.259.0a0
Install
17.2s avg
Import
Disk
555MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.259.0a0 · 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.940 runs
installs and imports cleanly · install 0.0s · import 0.000s · 480MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 17.2s · import 0.000s · 551MB
555MB installed
● package 555MB
Code
Verified usage

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

CodeStarAlpha
import aws_cdk.aws_codestar_alpha as codestar_alpha
from aws_cdk.aws_codestar import Project
Alpha modules use a distinct import path (`_alpha`) and often contain only L1 CloudFormation constructs (prefixed `Cfn`) before L2 constructs are developed.
App, Stack
from aws_cdk import App, Stack, Environment
import aws_cdk.core as cdk
CDK v2 changed core imports; `aws_cdk.core` is deprecated. Import `App`, `Stack`, `Environment` directly from `aws_cdk`.

This quickstart defines a basic CDK stack that includes a `CfnGitHubRepository` from the `aws-cdk-aws-codestar-alpha` module. Note that `CfnGitHubRepository` is an L1 (CloudFormation-level) construct and requires actual GitHub credentials (Personal Access Token) and repository details (owner, name) to be configured, typically via environment variables, for successful deployment. Remember to set `CDK_DEFAULT_ACCOUNT` and `CDK_DEFAULT_REGION`.

import os from aws_cdk import ( App, Stack, Environment ) import aws_cdk.aws_codestar_alpha as codestar_alpha class MyCodeStarStack(Stack): def __init__(self, scope: App, id: str, **kwargs) -> None: super().__init__(scope, id, **kwargs) # IMPORTANT: This is an L1 CloudFormation construct. It requires # actual GitHub credentials and repository details for successful deployment. # Store sensitive data in environment variables or AWS Secrets Manager. github_access_token = os.environ.get("GITHUB_ACCESS_TOKEN", "YOUR_GITHUB_PERSONAL_ACCESS_TOKEN") github_owner = os.environ.get("GITHUB_OWNER", "your-github-username") repository_name = os.environ.get("GITHUB_REPO_NAME", "my-codestar-repo") if github_access_token == "YOUR_GITHUB_PERSONAL_ACCESS_TOKEN": print("WARNING: GITHUB_ACCESS_TOKEN not set. This construct will likely fail deployment.") # Define a GitHub repository resource for CodeStar # This resource integrates an existing GitHub repo with AWS CodeStar. codestar_alpha.CfnGitHubRepository(self, "MyGitHubRepo", repository_name=repository_name, owner=github_owner, repository_access_token=github_access_token, # is_private=True, # Optional # repository_description="My CodeStar managed GitHub repository" # Optional ) app = App() MyCodeStarStack(app, "MyCodeStarStack", env=Environment(account=os.environ.get("CDK_DEFAULT_ACCOUNT"), region=os.environ.get("CDK_DEFAULT_REGION")) ) app.synth()
cdk --version
Debug
Known issues
breakingThis module is in 'alpha' status. Its APIs are unstable, subject to breaking changes without major version bumps, and should not be used in production environments.
fix
Review release notes for each update. Pin exact alpha versions to avoid unexpected changes. Plan for refactoring if upgrading.
affects: All alpha versions (e.g., 2.x.x.a0)
gotchaAlpha modules often initially provide only L1 (CloudFormation-level) constructs (prefixed with `Cfn`). These require detailed, low-level configuration and may not offer the higher-level abstractions found in stable L2 constructs.
fix
Carefully review the construct's properties in the AWS CDK API documentation. Be prepared to provide all required CloudFormation properties directly. Consider using a stable CDK service module if L2 constructs are required.
affects: All alpha versions (e.x. 2.x.x.a0)
breakingAWS CDK v1 and v2 are incompatible. Alpha constructs like `aws-cdk-aws-codestar-alpha` are built for CDK v2 and require `aws-cdk-lib` (v2) as a dependency. Attempting to use them with CDK v1 will result in errors.
fix
Ensure your project's `aws-cdk-lib` dependency is at version 2.x.x. Use `pip freeze | grep aws-cdk` to verify.
affects: v2.x.x.a0 when used with AWS CDK v1
gotchaCDK deployments often fail due to insufficient AWS IAM permissions for the default roles, especially when creating or modifying specialized resources like CodeStar projects or connections.
fix
Ensure the IAM role used by CDK (often `cdk-hnb659fds` for `cdk deploy` or your execution role) has the necessary permissions for AWS CodeStar and any related services (e.g., IAM, CloudFormation, CodeBuild, CodePipeline, S3). Check CloudTrail logs for specific access denied errors.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aws_cdk.aws_codestar_alpha'
The `aws-cdk-aws-codestar-alpha` package is not installed or the Python environment is incorrect.
fix
Run `pip install aws-cdk-aws-codestar-alpha` and ensure you are using the correct Python environment where it's installed.
jsii.errors.JavaScriptError: TypeError: Cannot read properties of undefined (reading 'someProperty')
This often occurs in alpha modules when an expected property is missing, or the API has changed. It's a common symptom of using an outdated construct definition or missing a required attribute.
fix
Consult the latest AWS CDK API documentation for `aws_cdk.aws_codestar_alpha` to verify construct properties and their types. Ensure all required properties are provided.
TypeError: __init__ missing 1 required positional argument: 'scope'
This error typically indicates that a CDK construct or stack constructor is being called incorrectly, missing the `scope` (parent construct) argument.
fix
Ensure you are passing the `self` (or another valid parent construct) as the first argument to the construct's `__init__` method, followed by an `id` and optional keyword arguments: `MyConstruct(self, 'MyId', ...)`.
Validation failed with following errors: [The 'repositoryAccessToken' property requires a value.]
For L1 constructs like `CfnGitHubRepository`, all required CloudFormation properties must be explicitly provided, including sensitive ones like access tokens.
fix
Provide a valid, non-empty value for `repository_access_token` (and other required properties) to the `CfnGitHubRepository` construct. Use environment variables or Secrets Manager for sensitive data.
Upgrade
Version history
2.259.0a0latest on PyPI · released Jun 12, 2026
Audit
Dependencies
aws-cdk-librequiredCore AWS CDK library for defining stacks and constructs.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
2
Resources
aws-cdk-aws-codestar-alpha — pip install aws-cdk-aws-codestar-alpha · libregistry