Skip to content

bug(harness): default role cannot access managed memory #2642

Closed

Description

@notgitika

Description

On the refactor branch, a standalone harness created with managed memory and the CLI-provisioned default execution role cannot be invoked.

The default role policy grants memory data-plane access to:

arn:aws:bedrock-agentcore:<region>:<account>:memory/harness_*

The service currently creates the managed memory as:

arn:aws:bedrock-agentcore:<region>:<account>:memory/<harnessName>-<suffix>

The resource does not match the policy, so the first invocation fails on bedrock-agentcore:ListEvents.

Steps to reproduce

agentcore harness create \
  --name H4verify \
  --model '{"bedrockModelConfig":{"modelId":"global.anthropic.claude-sonnet-4-6"}}' \
  --memory '{"managedMemoryConfiguration":{}}'

# Wait for READY, then:
agentcore harness invoke --id <harness-id> --prompt hi

Actual behavior

AccessDeniedException ... is not authorized to perform:
bedrock-agentcore:ListEvents on resource:
...:memory/H4verify-<suffix>

Expected behavior

The CLI-created default role should grant the harness access to its own service-managed memory while remaining scoped to that harness.

Verification

Reproduced live in us-west-2 from commit ef5b4eaf:

  • generated memory: memory/H4verify1021-<suffix>
  • generated policy: memory/harness_*
  • IAM simulation result for ListEvents: implicitDeny
  • harness invoke: AccessDeniedException

Related to #2026, which fixed the corresponding project/CDK role path.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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