Skip to content

Direct code deploy: uv fails with invalid value 'aarch64-manylinux2014' for '--python-platform' when using duckdb >= 1.3.2 from macOS #255

@alexander-grun

Description

@alexander-grun

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
  • uv installed via the official installer:
    curl -LsSf https://astral.sh/uv/install.sh | sh
  • bedrock-agentcore / AgentCore CLI installed via pip

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

  1. On macOS (Apple Silicon), create an AgentCore project configured for direct code deployment with:

    • deployment_type: direct_code_deploy
    • runtime_type: PYTHON_3_12
    • platform: linux/arm64
  2. Add duckdb>=1.3.2 to requirements.txt (along with bedrock-agentcore and other deps).

  3. Run:

    agentcore deploy
    # or
    agentcore launch
  4. 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 uv with a cross-platform target for Linux ARM64.

  • It passes --python-platform aarch64-manylinux2014 to uv.

  • The uv version 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 launch should:

    • Successfully build a Linux ARM64-compatible deployment package (using uv or another supported tool), or
    • At least provide a clear, supported path / command to do so.

Concretely:

  • Either:

    • AgentCore pins or bundles a uv version that accepts aarch64-manylinux2014, or
    • AgentCore uses a --python-platform value that is valid for current uv releases and matches the Amazon Linux 2023 ARM64 runtime’s glibc / manylinux baseline.
  • 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 (like duckdb>=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.2 is added, the current cross-compilation logic with uv fails on macOS.
  • The error is not about my code or DuckDB per se, but about the hard-coded --python-platform value passed by the AgentCore tooling conflicting with current uv behavior.

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

  1. What is the officially supported --python-platform / manylinux target for the AgentCore Runtime direct code environment (Amazon Linux 2023 ARM64)?

  2. Can the AgentCore CLI be updated to:

    • Use a --python-platform value that is valid for current uv versions and matches the runtime, or
    • Pin / vendor a uv version that supports aarch64-manylinux2014, or
    • Provide a dedicated agentcore build --platform linux/arm64 command that uses Docker with the same base image as the runtime to build dependencies?
  3. In the meantime, is there a recommended workaround for macOS users who:

    • Want to use direct code deploy,
    • Need duckdb >= 1.3.2 or similar native libraries,
    • And don’t want to switch to full container-based deployment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions