-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Summary
When using Amazon Bedrock AgentCore Runtime direct code deployment from macOS with duckdb >= 1.3.2 in requirements.txt, the dependency installation step with uv fails during cross-compilation for Linux ARM64.
The AgentCore CLI appears to invoke uv with:
--python-platform aarch64-manylinux2014
but the installed uv version does not recognize that value and exits with:
error: invalid value 'aarch64-manylinux2014' for '--python-platform <PYTHON_PLATFORM>'
tip: a similar value exists: 'aarch64-manylinux_2_40'
As a result, agentcore deploy / agentcore launch fails before the code is even uploaded/runs in the AgentCore runtime.
This makes it difficult to use native dependencies like duckdb >= 1.3.2 with direct code deploy from macOS.
Environment
Dev machine:
- macOS (Apple Silicon)
- Python 3.12
uvinstalled via the official installer:
curl -LsSf https://astral.sh/uv/install.sh | shbedrock-agentcore/ AgentCore CLI installed viapip
AgentCore configuration (excerpt from .bedrock_agentcore.yaml):
default_agent: cashflow_agent
agents:
cashflow_agent:
name: cashflow_agent
entrypoint: cashflow_agent.py
deployment_type: direct_code_deploy
runtime_type: PYTHON_3_12
platform: linux/arm64
container_runtime: null
source_path: .
aws:
execution_role: <redacted-iam-role-arn>
execution_role_auto_create: true
account: '<redacted-account-id>'
region: <redacted-region>
ecr_repository: null
ecr_auto_create: false
s3_path: <redacted-s3-path>
s3_auto_create: false
network_configuration:
network_mode: PUBLIC
network_mode_config: null
protocol_configuration:
server_protocol: HTTP
observability:
enabled: true
lifecycle_configuration:
idle_runtime_session_timeout: null
max_lifetime: null
bedrock_agentcore:
agent_id: cashflow_agent-<redacted>
agent_arn: arn:aws:bedrock-agentcore:<redacted-region>:<redacted-account-id>:runtime/cashflow_agent-<redacted>
agent_session_id: null
codebuild:
project_name: null
execution_role: null
source_bucket: null
memory:
mode: NO_MEMORY
memory_id: null
memory_arn: null
memory_name: null
event_expiry_days: 30
first_invoke_memory_check_done: false
was_created_by_toolkit: false
identity:
credential_providers: []
workload: null
authorizer_configuration: null
request_header_configuration: null
oauth_configuration: null(If you prefer, you can simplify this further to just show the relevant bits: deployment_type, runtime_type, platform.)
Dependencies (relevant part of requirements.txt):
duckdb>=1.3.2
bedrock-agentcore
# other deps...
Steps to Reproduce
-
On macOS (Apple Silicon), create an AgentCore project configured for direct code deployment with:
deployment_type: direct_code_deployruntime_type: PYTHON_3_12platform: linux/arm64
-
Add
duckdb>=1.3.2torequirements.txt(along withbedrock-agentcoreand other deps). -
Run:
agentcore deploy # or agentcore launch -
Observe the output during the dependency installation step:
Installing dependencies with uv (cross-compiling for Linux ARM64)... ❌ Failed to install dependencies with uv: error: invalid value 'aarch64-manylinux2014' for '--python-platform <PYTHON_PLATFORM>' tip: a similar value exists: 'aarch64-manylinux_2_40' For more information, try '--help'.
Actual Behavior
-
The AgentCore CLI attempts to install dependencies using
uvwith a cross-platform target for Linux ARM64. -
It passes
--python-platform aarch64-manylinux2014touv. -
The
uvversion installed on macOS rejects this value as invalid and terminates with:error: invalid value 'aarch64-manylinux2014' for '--python-platform <PYTHON_PLATFORM>' tip: a similar value exists: 'aarch64-manylinux_2_40' -
The deployment fails at the packaging / dependency-resolution stage, so:
- No code is deployed to AgentCore Runtime.
- The error happens before any code runs in the Amazon Linux ARM64 environment.
This makes it impossible (with the current tooling) to use duckdb>=1.3.2 with direct code deploy from macOS without manual workarounds.
Expected Behavior
From a user perspective, for direct code deployment with platform: linux/arm64 on macOS:
-
agentcore deploy/agentcore launchshould:- Successfully build a Linux ARM64-compatible deployment package (using
uvor another supported tool), or - At least provide a clear, supported path / command to do so.
- Successfully build a Linux ARM64-compatible deployment package (using
Concretely:
-
Either:
- AgentCore pins or bundles a
uvversion that acceptsaarch64-manylinux2014, or - AgentCore uses a
--python-platformvalue that is valid for currentuvreleases and matches the Amazon Linux 2023 ARM64 runtime’s glibc / manylinux baseline.
- AgentCore pins or bundles a
-
And the documentation should clearly describe the recommended flow for:
“I’m on macOS, using direct code deploy with
platform: linux/arm64, and I depend on a package with native Linux ARM64 wheels (likeduckdb>=1.3.2).”
Why This Matters
- Direct code deploy is positioned as the quickest way to iterate with AgentCore, including from developer laptops (macOS).
- As soon as a native dependency like
duckdb>=1.3.2is added, the current cross-compilation logic withuvfails on macOS. - The error is not about my code or DuckDB per se, but about the hard-coded
--python-platformvalue passed by the AgentCore tooling conflicting with currentuvbehavior.
This forces users to:
- Either downgrade DuckDB or avoid it,
- Or manually build dependencies in an Amazon Linux ARM64 environment (EC2 Graviton, Docker), which removes much of the convenience of direct code deploy.
Questions / Requests
-
What is the officially supported
--python-platform/ manylinux target for the AgentCore Runtime direct code environment (Amazon Linux 2023 ARM64)? -
Can the AgentCore CLI be updated to:
- Use a
--python-platformvalue that is valid for currentuvversions and matches the runtime, or - Pin / vendor a
uvversion that supportsaarch64-manylinux2014, or - Provide a dedicated
agentcore build --platform linux/arm64command that uses Docker with the same base image as the runtime to build dependencies?
- Use a
-
In the meantime, is there a recommended workaround for macOS users who:
- Want to use direct code deploy,
- Need
duckdb >= 1.3.2or similar native libraries, - And don’t want to switch to full container-based deployment?