feat: multi-platform CodeBuild support (Windows, Linux x64, Linux ARM64)#157
Open
pipeflo wants to merge 12 commits intoaws-solutions-library-samples:mainfrom
Open
feat: multi-platform CodeBuild support (Windows, Linux x64, Linux ARM64)#157pipeflo wants to merge 12 commits intoaws-solutions-library-samples:mainfrom
pipeflo wants to merge 12 commits intoaws-solutions-library-samples:mainfrom
Conversation
…hema preferred_username is listed in AliasAttributes, which requires it to be unique across the pool. Having it also as Required: true creates a conflict: users created via admin-create-user cannot set this attribute during creation, leaving them unable to log in through the Cognito Hosted UI. Changing to Required: false resolves the issue while still allowing preferred_username to function as an alias for sign-in.
Reflects the schema fix — preferred_username is an optional attribute used as a sign-in alias, not a required attribute.
When the provider is Cognito, the JWT iss claim is https://cognito-idp.<region>.amazonaws.com/<pool-id>, not the hosted UI domain (e.g., app.auth.region.amazoncognito.com). The API Gateway JWT authorizer on the quota API rejects all Cognito tokens because the issuer URL doesn't match. Construct the correct cognito-idp endpoint from the User Pool ID for Cognito providers.
The OktaDomain AllowedPattern regex only accepted .okta.com and .okta-emea.com domains, rejecting .oktapreview.com (Okta sandbox/test environments). Update the regex to also accept preview domains.
…tection Two issues preventing native Windows builds with Nuitka: 1. binary_name was never set for the Windows target platform, causing 'cannot access local variable binary_name' error at build time. 2. Nuitka availability check used 'which' (Unix-only command), which fails on Windows. Use 'python -m nuitka --version' instead, which works cross-platform.
When building natively on Windows with monitoring enabled, the OTEL helper build would always fail because it expected the binary to be pre-built by CodeBuild. Add native Windows support to both _build_otel_helper (routing) and _build_native_otel_helper (Nuitka build) so the OTEL helper can be compiled locally on Windows.
The existing Windows build docs assume a macOS/Linux admin using CodeBuild. Add documentation for building natively on Windows with Nuitka, including prerequisites, cross-platform build matrix, multi-platform distribution strategy, and troubleshooting.
On Windows, open() defaults to cp1252 encoding which cannot handle Unicode characters (emojis like ❌, ✓,⚠️ ) used in install.sh and README.md. Add explicit encoding="utf-8" to these file writers.
- Add package_cb command to trigger CodeBuild from any OS - Support interactive platform selection or --platform flag - Fix MinGW SSL download error in Windows CodeBuild buildspec - Fix PATH persistence across CodeBuild PowerShell commands - Add Linux x64 and Linux ARM64 CodeBuild projects with PyInstaller - Fix zip path separators for Windows compatibility (.as_posix()) - All 3 platforms tested and verified in CodeBuild Co-Authored-By: Claude
- builds.py: support listing/status/download for all 3 CodeBuild platforms (Windows, Linux x64, Linux ARM64), not just Windows - package_cb.py: add macOS local builds, OTel resource attributes prompts, co-authorship option, and build-verbose flag - test_package_async.py: updated tests for multi-platform builds
The inline PowerShell in install.bat failed on Windows because CMD caret (^) line continuations are literal inside double quotes, and escaped quotes (\") break CMD quote tracking — causing PowerShell variables to leak out as CMD commands. Split into install.bat (3-line launcher) + ccwb-install.ps1 (pure PowerShell logic). Updated distribute.py to include ccwb-install.ps1 in package archives and per-OS packages. Updated all docs with new file.
- install.sh: force Unix line endings (newline="\n") when generated on Windows, preventing "cannot execute: required file not found" on Linux - CodeBuild Linux x64: switch from Ubuntu 24.04 (standard:7.0) to Amazon Linux 2023 (amazonlinux2-x86_64-standard:5.0) for glibc 2.34 compatibility — binaries now work on AL2023/RHEL9/Rocky9 - Add chmod +x install.sh to all CLI output and documentation since zip archives lose Unix execute permissions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds multi-platform CodeBuild support so administrators can build distribution binaries for all platforms from any machine (including Windows).
package_cbcommand: triggers CodeBuild projects for Windows (Nuitka+MinGW), Linux x64 (PyInstaller), and Linux ARM64 (PyInstaller). On macOS, also builds Mac binaries locally.buildscommand: lists, checks status, and downloads artifacts across all 3 platforms (previously Windows-only).codebuild-windows.yaml): adds Linux x64 and Linux ARM64 CodeBuild projects alongside the existing Windows project.package_cbcommand.Changed files
deployment/infrastructure/codebuild-windows.yamlsource/claude_code_with_bedrock/cli/commands/package_cb.pysource/claude_code_with_bedrock/cli/commands/builds.pysource/claude_code_with_bedrock/cli/__init__.pyPackageCbCommandsource/tests/cli/commands/test_package_async.pyWorkflow
Notes
package_cbalso prompts for OTel resource attributes and co-authorship preferenceTest plan
ccwb package_cband verify all 3 CodeBuild builds startccwb buildsand verify all 3 platforms listedccwb builds --status latestafter builds completeccwb builds --status latest --downloadand verify artifacts extractedccwb distributeand verify presigned URL generatedpoetry run pytest tests/cli/commands/test_package_async.py -v— 9 tests pass