Skip to content

Add Resource Tags

This guide explains how the adapter tags AWS resources and how to add your own custom tags for cost allocation, access control, and organizational purposes.

  • A working adapter configuration with region and runtime_role_arn.
  • Familiarity with AWS resource tagging concepts.

Apply consistent tags to every AWS resource created by the adapter, combining automatic pack metadata tags with your own custom tags.

The adapter automatically applies three metadata tags to every resource it creates. These are derived from the prompt pack definition:

Tag keyValue sourceExample
promptpack:pack-idThe pack’s id fieldmy-assistant
promptpack:versionThe pack’s version field1.2.0
promptpack:agentThe agent member name (multi-agent packs only)coordinator

The promptpack:agent tag is set per-resource. For multi-agent packs, each runtime and its associated resources receive the tag with the corresponding agent member name. For single-agent packs, this tag is omitted.

You do not need to configure anything to get these tags — they are always applied.

Add a tags map to your deploy config:

region: us-west-2
runtime_role_arn: arn:aws:iam::123456789012:role/AgentCoreExecutionRole
tags:
environment: production
team: ml-platform
cost-center: CC-1234
project: customer-support-bot

These tags are merged with the default tags and applied to all resources.

The adapter enforces the following limits on user-defined tags:

ConstraintLimit
Maximum number of user tags50
Maximum key length128 characters
Maximum value length256 characters
Empty keysNot allowed

If any limit is exceeded, validation fails with a descriptive error before the deployment starts. For example:

tags: at most 50 tags allowed, got 53
tags: key "..." exceeds max length 128
tags: value for key "..." exceeds max length 256

User tags take precedence over default tags when keys collide. This means you can override the automatic pack metadata if needed:

tags:
promptpack:version: custom-build-42

In this example, the promptpack:version tag on all resources will be custom-build-42 instead of the pack’s actual version. Use this sparingly — overriding default tags can make it harder to trace resources back to their source pack.

Tags are applied to all AWS resources created by the adapter:

Resource typeTag behavior
agent_runtimeDefault tags + user tags. Multi-agent packs also set promptpack:agent.
tool_gatewayDefault tags + user tags.
memoryDefault tags + user tags.
a2a_endpointDefault tags + user tags.
evaluatorDefault tags + user tags.
cedar_policyDefault tags + user tags.

Given this config:

region: us-west-2
runtime_role_arn: arn:aws:iam::123456789012:role/AgentCoreExecutionRole
memory_store: persistent
tags:
environment: staging
team: ml-ops

And a pack with id: support-bot, version: 2.0.0, and a single agent, every created resource will have these tags:

Tag keyTag value
promptpack:pack-idsupport-bot
promptpack:version2.0.0
environmentstaging
teamml-ops

Tags not appearing on resources — Verify that the tags field is at the top level of the deploy config, not nested inside another object. Tags must be a flat map[string]string.

Validation errors about tag limits — Reduce the number of tags or shorten long keys/values. The 50-tag limit applies only to user-defined tags; default tags do not count toward it.

Tag key conflicts — If you intentionally override a default tag, the adapter does not warn you. Double-check your tag keys if you see unexpected values on deployed resources.