[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69BFT5RJ78RV71NSH1K0JC2":3,"skill-same:01M69BFT5RJ78RV71NSH1K0JC2":123},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":26,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M69BFT5RJ78RV71NSH1K0JC2","deploy-agent-aca-aws",null,"AI-led deployment of the AWS Bedrock sample agent with the Microsoft Entra Agent ID sidecar to Azure Container Apps. Use when the user wants to deploy the AWS sample to ACA, provision the AWS-federation intermediary Entra app, wire the token refresher, create the AWS OIDC provider and IAM role for Bedrock, build and push the four container images to ACR, or debug InvalidIdentityToken \u002F AADSTS65001 \u002F Directory.AccessAsUser.All \u002F AcrPull errors in this specific deployment. NOT for local docker-compose (use sidecar\u002Fdev) and NOT for GCP (deploy-agent-aca-gcp, pending). Chains to entra-agent-id-setup for the Blueprint + Agent Identity + Client SPA objects.","microsoft\u002Fentra-agentid-samples","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69BFR215QBKQVG4EP8577MV",15,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[27,28,29,30,9,31,32,33,34,35,36,37,38],"deploy","deploy agent aca aws","directory","docker","identity","entra agent id","setup","debug","azure","deployment","container images","create","2026-11-10 10:12:30",false,"---\nname: deploy-agent-aca-aws\ndescription: 'AI-led deployment of the AWS Bedrock sample agent with the Microsoft Entra Agent ID sidecar to Azure Container Apps. Use when the user wants to deploy the AWS sample to ACA, provision the AWS-federation intermediary Entra app, wire the token refresher, create the AWS OIDC provider and IAM role for Bedrock, build and push the four container images to ACR, or debug InvalidIdentityToken \u002F AADSTS65001 \u002F Directory.AccessAsUser.All \u002F AcrPull errors in this specific deployment. NOT for local docker-compose (use sidecar\u002Fdev) and NOT for GCP (deploy-agent-aca-gcp, pending). Chains to entra-agent-id-setup for the Blueprint + Agent Identity + Client SPA objects.'\n---\n\n# Deploy AWS Bedrock Agent to Azure Container Apps (AI-Led)\n\nEnd-to-end, secretless deployment of the AWS sample agent (`sidecar\u002Faws`) to Azure Container Apps with two federation chains: MI → Entra (direct) and MI → AWS STS (via v1 token exchange through an intermediary Entra app).\n\n**Canonical tutorial:** [sidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md). This skill is the automated, fast-path counterpart — read the tutorial when you need the \"why\", use this skill when you need to ship.\n\n## When to Use\n\n- User says: \"deploy AWS sample to ACA\", \"deploy agent to Azure Container Apps\", \"ship the AWS sidecar to Azure\"\n- User hits `InvalidIdentityToken: Incorrect token audience` — see [references\u002Fv1-token-exchange.md](.\u002Freferences\u002Fv1-token-exchange.md)\n- User hits `AADSTS65001` on OBO sign-in — see [references\u002Fpost-deploy-manual-steps.md](.\u002Freferences\u002Fpost-deploy-manual-steps.md)\n- User hits Graph `Directory.AccessAsUser.All` rejection on Blueprint PATCH — see [references\u002Ftroubleshooting.md](.\u002Freferences\u002Ftroubleshooting.md)\n- User asks \"why do we need an intermediary app\" or \"why can't the MI talk to AWS directly\"\n\n## Do NOT Use When\n\n- **Local dev** (docker-compose) — use `sidecar\u002Fdev\u002F` directly, no federation needed\n- **GCP deployment** — pending skill `deploy-agent-aca-gcp` (Workload Identity Federation is different)\n- **Azure App Service** — `sidecar\u002Faws\u002FDEPLOY-AZURE-APP-SERVICE.md` exists but is outdated; prefer Container Apps\n\n## Prerequisites (verify BEFORE running anything)\n\n1. **Entra role** on signing-in user — one of: `Global Administrator`, `Agent ID Administrator`, `Agent ID Developer`. `Application Administrator` alone returns 403 on blueprint creation. See [entra-agent-id-setup](..\u002Fentra-agent-id-setup\u002FSKILL.md).\n2. **AWS Bedrock access** enabled for `anthropic.claude-3-haiku-20240307-v1:0` in the target region (request via Bedrock console if needed).\n3. **Bedrock pre-flight** — run a real `invoke-model` call **before** provisioning anything. Confirms access + region + credentials in 30 seconds. Most late-stage failures in this skill come from skipping this.\n\n   ```bash\n   aws bedrock-runtime invoke-model \\\n     --region \"$AWS_REGION\" --model-id \"$BEDROCK_MODEL_ID\" \\\n     --body '{\"anthropic_version\":\"bedrock-2023-05-31\",\"max_tokens\":10,\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}' \\\n     --cli-binary-format raw-in-base64-out \u002Ftmp\u002Fbedrock-preflight.json \\\n     && echo \"✅ ok\" || echo \"❌ fix access\u002Fregion before deploying\"\n   ```\n\n   If it fails, stop and fix before continuing. Common causes: model access not granted (console → Model access), wrong region for the inference profile (`us.` IDs require `us-east-1` \u002F `us-east-2` \u002F `us-west-2`), expired AWS creds. Full error table: [deploy\u002Fazure\u002Fcontainer-apps\u002Faws\u002FREADME.md §2.2.1](..\u002F..\u002F..\u002Fdeploy\u002Fazure\u002Fcontainer-apps\u002Faws\u002FREADME.md#221-pre-flight-verify-bedrock-access-before-deploying).\n4. **Tooling**: `az` ≥ 2.60, `aws` v2, `pwsh` 7.4+, `Microsoft.Graph.*` 2.35+, and one of: `docker buildx` for `linux\u002Famd64` **OR** `az acr build` (no local Docker needed).\n5. **Tenant-confirmed preflight** — ALWAYS confirm tenant ID + subscription ID with the user before any `az` command that mutates resources (user has multiple accounts; see user memory).\n6. **Entra Agent ID base objects** exist — Blueprint, Agent Identity, Client SPA. If not, run the [entra-agent-id-setup](..\u002Fentra-agent-id-setup\u002FSKILL.md) skill first.\n\n## SKU decisions — ask the user first\n\nBefore running any `az` command that provisions resources, confirm each SKU choice **with the user**. Do not silently default to the cheapest tier. The orchestrator requires each SKU variable to be set and fails hard if any is missing. Full tradeoff matrix: [references\u002Fsku-sizing.md](.\u002Freferences\u002Fsku-sizing.md).\n\n| Variable | Ask | Demo default | Silent-failure mode if chosen wrong |\n|---|---|---|---|\n| `ACR_SKU` | `Basic` \u002F `Standard` \u002F `Premium` | `Basic` | Basic throttles pulls on rapid revision churn |\n| `ACA_WORKLOAD_PROFILE` | `Consumption` \u002F `Dedicated-D4` \u002F GPU | `Consumption` | Consumption + `minReplicas=0` = visible cold starts |\n| `LOGS_DESTINATION` | `none` \u002F `log-analytics` | `log-analytics` | `none` means you cannot debug sidecar auth errors post-hoc |\n| `MIN_REPLICAS` \u002F `MAX_REPLICAS` | counts | `1` \u002F `1` | `0` = cold starts; `>1` without autoscale rules = cost surprise |\n| `AWS_REGION` + `BEDROCK_MODEL_ID` | (see sku-sizing.md §6) | `us-east-2` + `us.anthropic.claude-3-haiku-…` | Wrong region = `ValidationException` on first Bedrock call |\n\n**When invoking this skill, explicitly state the defaults to the user and ask them to confirm or override — do not assume.**\n\n## Procedure\n\n### Step 0 — Confirm account and populate variables\n\nAsk the user to confirm: tenant ID, subscription ID, AWS account ID, AWS region. Then:\n\n```bash\ncp .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fdeploy-vars.sh.template \u002Ftmp\u002Fdeploy-vars.sh\n# edit \u002Ftmp\u002Fdeploy-vars.sh with the confirmed values\nsource \u002Ftmp\u002Fdeploy-vars.sh\naz login --tenant \"$TENANT_ID\" && az account set --subscription \"$SUBSCRIPTION_ID\"\naws sts get-caller-identity\n```\n\nEvery subsequent step re-sources `\u002Ftmp\u002Fdeploy-vars.sh` and appends newly discovered IDs back to the file.\n\n### Step 1 — Create Entra objects (Blueprint, Agent, Client SPA)\n\nDelegate to [entra-agent-id-setup](..\u002Fentra-agent-id-setup\u002FSKILL.md). Capture `BLUEPRINT_APP_ID`, `AGENT_CLIENT_ID`, `CLIENT_SPA_APP_ID` into `\u002Ftmp\u002Fdeploy-vars.sh`.\n\nThen configure the Blueprint for OBO using the ACA-compatible PowerShell script (the shipped `.sh` form uses a Graph filter that Agent Identity Blueprint types reject):\n\n```bash\npwsh -NoProfile -File .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-obo-blueprint-for-aca.ps1 \\\n  -BlueprintAppId \"$BLUEPRINT_APP_ID\" \\\n  -ClientSpaAppId \"$CLIENT_SPA_APP_ID\" \\\n  -AgentAppId \"$AGENT_CLIENT_ID\" \\\n  -TenantId \"$TENANT_ID\"\n```\n\n### Step 2 — Azure infrastructure (RG, ACR, env, container app skeleton)\n\nSee tutorial [§6](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#6-phase-2--create-the-azure-infrastructure). Capture `MI_OBJECT_ID` and `APP_FQDN`, append to `\u002Ftmp\u002Fdeploy-vars.sh`. Grant `AcrPull` to the MI.\n\n### Step 3 — Federate MI to Blueprint (chain A)\n\nSingle Graph call — see tutorial [§7](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#7-phase-3--federate-the-managed-identity-to-the-blueprint). Subject = `$MI_OBJECT_ID`, audience = `api:\u002F\u002FAzureADTokenExchange`.\n\n### Step 4 — Federate MI to AWS (chain B)\n\n```bash\nbash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-intermediary-app.sh  # creates STS app, sets v1 tokens, adds FIC\nbash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-iam-role.sh          # OIDC provider + IAM role + Bedrock policy\n```\n\nBoth scripts source `\u002Ftmp\u002Fdeploy-vars.sh` and append `STS_APP_ID`, `STS_APP_URI`, `STS_SP_OID`, `AWS_ROLE_ARN`, `V1_OIDC_ARN`.\n\n**Why the v1 exchange.** See [references\u002Fv1-token-exchange.md](.\u002Freferences\u002Fv1-token-exchange.md). Short version: AWS STS rejects Azure-MI v2 audiences; an intermediary Entra app with `requestedAccessTokenVersion=1` and `identifierUris=[\"api:\u002F\u002F\u003Cself>\"]` is the Microsoft-supported adapter.\n\n### Step 5 — Build and push images\n\nTutorial [§9](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#9-phase-5--build-and-push-container-images). Three images: `llm-agent`, `weather-api`, `token-refresher`. The sidecar image is pulled from MCR at runtime.\n\n### Step 6 — Deploy the multi-container app\n\n```bash\nenvsubst \u003C .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fcontainerapp.yaml.template > \u002Ftmp\u002Fcontainerapp.yaml\naz containerapp update -g \"$RG\" -n \"$APP_NAME\" --yaml \u002Ftmp\u002Fcontainerapp.yaml\n```\n\n### Step 7 — Post-deploy manual wiring (REQUIRED)\n\nTwo things that cannot be done before deploy:\n\n1. **Add deployed SPA redirect URI** — `bash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fadd-spa-redirect-uri.sh`\n2. **Grant Agent → Graph delegated `User.Read` admin consent** (fixes `AADSTS65001` on OBO):\n\n   ```bash\n   pwsh -NoProfile -File .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fgrant-agent-obo-consent.ps1 \\\n     -AgentAppId \"$AGENT_CLIENT_ID\" -TenantId \"$TENANT_ID\"\n   ```\n\nFull rationale: [references\u002Fpost-deploy-manual-steps.md](.\u002Freferences\u002Fpost-deploy-manual-steps.md).\n\n### Step 8 — Verify\n\nTutorial [§12](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#12-phase-8--verify). Autonomous `curl` returns real weather; OBO works via MSAL popup; CloudTrail shows `AssumeRoleWithWebIdentity` events with `identityProvider = sts.windows.net\u002F\u003Ctenant>\u002F`.\n\n## One-Shot Orchestrator\n\nIf all prerequisites are in place and variables are confirmed, run:\n\n```bash\nbash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fdeploy-aca-aws.sh\n```\n\nThis is idempotent and invokes steps 2–6 in order. Steps 0, 1, and 7 require human decisions and remain manual.\n\n## Key Artifacts (what you'll end up with)\n\nPersisted in `\u002Ftmp\u002Fdeploy-vars.sh`:\n\n| Variable | Example |\n|---|---|\n| `TENANT_ID`, `SUBSCRIPTION_ID`, `AWS_ACCOUNT_ID` | (user-provided) |\n| `BLUEPRINT_APP_ID`, `AGENT_CLIENT_ID`, `CLIENT_SPA_APP_ID` | from Step 1 |\n| `MI_OBJECT_ID`, `APP_FQDN` | from Step 2 |\n| `STS_APP_ID`, `STS_APP_URI`, `STS_SP_OID`, `AWS_ROLE_ARN`, `V1_OIDC_ARN` | from Step 4 |\n\n**No client secrets, no AWS access keys**, anywhere.\n\n## References\n\n- [Architecture summary](.\u002Freferences\u002Farchitecture.md)\n- [SKU and sizing decisions](.\u002Freferences\u002Fsku-sizing.md)\n- [Why the AWS leg needs a v1 token exchange](.\u002Freferences\u002Fv1-token-exchange.md)\n- [Post-deploy manual steps (SPA URI + OBO consent)](.\u002Freferences\u002Fpost-deploy-manual-steps.md)\n- [Troubleshooting matrix](.\u002Freferences\u002Ftroubleshooting.md)\n- [Full tutorial](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md)\n","# Deploy AWS Bedrock Agent to Azure Container Apps (AI-Led)\n\nEnd-to-end, secretless deployment of the AWS sample agent (`sidecar\u002Faws`) to Azure Container Apps with two federation chains: MI → Entra (direct) and MI → AWS STS (via v1 token exchange through an intermediary Entra app).\n\n**Canonical tutorial:** [sidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md). This skill is the automated, fast-path counterpart — read the tutorial when you need the \"why\", use this skill when you need to ship.\n\n## When to Use\n\n- User says: \"deploy AWS sample to ACA\", \"deploy agent to Azure Container Apps\", \"ship the AWS sidecar to Azure\"\n- User hits `InvalidIdentityToken: Incorrect token audience` — see [references\u002Fv1-token-exchange.md](.\u002Freferences\u002Fv1-token-exchange.md)\n- User hits `AADSTS65001` on OBO sign-in — see [references\u002Fpost-deploy-manual-steps.md](.\u002Freferences\u002Fpost-deploy-manual-steps.md)\n- User hits Graph `Directory.AccessAsUser.All` rejection on Blueprint PATCH — see [references\u002Ftroubleshooting.md](.\u002Freferences\u002Ftroubleshooting.md)\n- User asks \"why do we need an intermediary app\" or \"why can't the MI talk to AWS directly\"\n\n## Do NOT Use When\n\n- **Local dev** (docker-compose) — use `sidecar\u002Fdev\u002F` directly, no federation needed\n- **GCP deployment** — pending skill `deploy-agent-aca-gcp` (Workload Identity Federation is different)\n- **Azure App Service** — `sidecar\u002Faws\u002FDEPLOY-AZURE-APP-SERVICE.md` exists but is outdated; prefer Container Apps\n\n## Prerequisites (verify BEFORE running anything)\n\n1. **Entra role** on signing-in user — one of: `Global Administrator`, `Agent ID Administrator`, `Agent ID Developer`. `Application Administrator` alone returns 403 on blueprint creation. See [entra-agent-id-setup](..\u002Fentra-agent-id-setup\u002FSKILL.md).\n2. **AWS Bedrock access** enabled for `anthropic.claude-3-haiku-20240307-v1:0` in the target region (request via Bedrock console if needed).\n3. **Bedrock pre-flight** — run a real `invoke-model` call **before** provisioning anything. Confirms access + region + credentials in 30 seconds. Most late-stage failures in this skill come from skipping this.\n\n   ```bash\n   aws bedrock-runtime invoke-model \\\n     --region \"$AWS_REGION\" --model-id \"$BEDROCK_MODEL_ID\" \\\n     --body '{\"anthropic_version\":\"bedrock-2023-05-31\",\"max_tokens\":10,\"messages\":[{\"role\":\"user\",\"content\":\"hi\"}]}' \\\n     --cli-binary-format raw-in-base64-out \u002Ftmp\u002Fbedrock-preflight.json \\\n     && echo \"✅ ok\" || echo \"❌ fix access\u002Fregion before deploying\"\n   ```\n\n   If it fails, stop and fix before continuing. Common causes: model access not granted (console → Model access), wrong region for the inference profile (`us.` IDs require `us-east-1` \u002F `us-east-2` \u002F `us-west-2`), expired AWS creds. Full error table: [deploy\u002Fazure\u002Fcontainer-apps\u002Faws\u002FREADME.md §2.2.1](..\u002F..\u002F..\u002Fdeploy\u002Fazure\u002Fcontainer-apps\u002Faws\u002FREADME.md#221-pre-flight-verify-bedrock-access-before-deploying).\n4. **Tooling**: `az` ≥ 2.60, `aws` v2, `pwsh` 7.4+, `Microsoft.Graph.*` 2.35+, and one of: `docker buildx` for `linux\u002Famd64` **OR** `az acr build` (no local Docker needed).\n5. **Tenant-confirmed preflight** — ALWAYS confirm tenant ID + subscription ID with the user before any `az` command that mutates resources (user has multiple accounts; see user memory).\n6. **Entra Agent ID base objects** exist — Blueprint, Agent Identity, Client SPA. If not, run the [entra-agent-id-setup](..\u002Fentra-agent-id-setup\u002FSKILL.md) skill first.\n\n## SKU decisions — ask the user first\n\nBefore running any `az` command that provisions resources, confirm each SKU choice **with the user**. Do not silently default to the cheapest tier. The orchestrator requires each SKU variable to be set and fails hard if any is missing. Full tradeoff matrix: [references\u002Fsku-sizing.md](.\u002Freferences\u002Fsku-sizing.md).\n\n| Variable | Ask | Demo default | Silent-failure mode if chosen wrong |\n|---|---|---|---|\n| `ACR_SKU` | `Basic` \u002F `Standard` \u002F `Premium` | `Basic` | Basic throttles pulls on rapid revision churn |\n| `ACA_WORKLOAD_PROFILE` | `Consumption` \u002F `Dedicated-D4` \u002F GPU | `Consumption` | Consumption + `minReplicas=0` = visible cold starts |\n| `LOGS_DESTINATION` | `none` \u002F `log-analytics` | `log-analytics` | `none` means you cannot debug sidecar auth errors post-hoc |\n| `MIN_REPLICAS` \u002F `MAX_REPLICAS` | counts | `1` \u002F `1` | `0` = cold starts; `>1` without autoscale rules = cost surprise |\n| `AWS_REGION` + `BEDROCK_MODEL_ID` | (see sku-sizing.md §6) | `us-east-2` + `us.anthropic.claude-3-haiku-…` | Wrong region = `ValidationException` on first Bedrock call |\n\n**When invoking this skill, explicitly state the defaults to the user and ask them to confirm or override — do not assume.**\n\n## Procedure\n\n### Step 0 — Confirm account and populate variables\n\nAsk the user to confirm: tenant ID, subscription ID, AWS account ID, AWS region. Then:\n\n```bash\ncp .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fdeploy-vars.sh.template \u002Ftmp\u002Fdeploy-vars.sh\n# edit \u002Ftmp\u002Fdeploy-vars.sh with the confirmed values\nsource \u002Ftmp\u002Fdeploy-vars.sh\naz login --tenant \"$TENANT_ID\" && az account set --subscription \"$SUBSCRIPTION_ID\"\naws sts get-caller-identity\n```\n\nEvery subsequent step re-sources `\u002Ftmp\u002Fdeploy-vars.sh` and appends newly discovered IDs back to the file.\n\n### Step 1 — Create Entra objects (Blueprint, Agent, Client SPA)\n\nDelegate to [entra-agent-id-setup](..\u002Fentra-agent-id-setup\u002FSKILL.md). Capture `BLUEPRINT_APP_ID`, `AGENT_CLIENT_ID`, `CLIENT_SPA_APP_ID` into `\u002Ftmp\u002Fdeploy-vars.sh`.\n\nThen configure the Blueprint for OBO using the ACA-compatible PowerShell script (the shipped `.sh` form uses a Graph filter that Agent Identity Blueprint types reject):\n\n```bash\npwsh -NoProfile -File .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-obo-blueprint-for-aca.ps1 \\\n  -BlueprintAppId \"$BLUEPRINT_APP_ID\" \\\n  -ClientSpaAppId \"$CLIENT_SPA_APP_ID\" \\\n  -AgentAppId \"$AGENT_CLIENT_ID\" \\\n  -TenantId \"$TENANT_ID\"\n```\n\n### Step 2 — Azure infrastructure (RG, ACR, env, container app skeleton)\n\nSee tutorial [§6](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#6-phase-2--create-the-azure-infrastructure). Capture `MI_OBJECT_ID` and `APP_FQDN`, append to `\u002Ftmp\u002Fdeploy-vars.sh`. Grant `AcrPull` to the MI.\n\n### Step 3 — Federate MI to Blueprint (chain A)\n\nSingle Graph call — see tutorial [§7](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#7-phase-3--federate-the-managed-identity-to-the-blueprint). Subject = `$MI_OBJECT_ID`, audience = `api:\u002F\u002FAzureADTokenExchange`.\n\n### Step 4 — Federate MI to AWS (chain B)\n\n```bash\nbash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-intermediary-app.sh  # creates STS app, sets v1 tokens, adds FIC\nbash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-iam-role.sh          # OIDC provider + IAM role + Bedrock policy\n```\n\nBoth scripts source `\u002Ftmp\u002Fdeploy-vars.sh` and append `STS_APP_ID`, `STS_APP_URI`, `STS_SP_OID`, `AWS_ROLE_ARN`, `V1_OIDC_ARN`.\n\n**Why the v1 exchange.** See [references\u002Fv1-token-exchange.md](.\u002Freferences\u002Fv1-token-exchange.md). Short version: AWS STS rejects Azure-MI v2 audiences; an intermediary Entra app with `requestedAccessTokenVersion=1` and `identifierUris=[\"api:\u002F\u002F\u003Cself>\"]` is the Microsoft-supported adapter.\n\n### Step 5 — Build and push images\n\nTutorial [§9](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#9-phase-5--build-and-push-container-images). Three images: `llm-agent`, `weather-api`, `token-refresher`. The sidecar image is pulled from MCR at runtime.\n\n### Step 6 — Deploy the multi-container app\n\n```bash\nenvsubst \u003C .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fcontainerapp.yaml.template > \u002Ftmp\u002Fcontainerapp.yaml\naz containerapp update -g \"$RG\" -n \"$APP_NAME\" --yaml \u002Ftmp\u002Fcontainerapp.yaml\n```\n\n### Step 7 — Post-deploy manual wiring (REQUIRED)\n\nTwo things that cannot be done before deploy:\n\n1. **Add deployed SPA redirect URI** — `bash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fadd-spa-redirect-uri.sh`\n2. **Grant Agent → Graph delegated `User.Read` admin consent** (fixes `AADSTS65001` on OBO):\n\n   ```bash\n   pwsh -NoProfile -File .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fgrant-agent-obo-consent.ps1 \\\n     -AgentAppId \"$AGENT_CLIENT_ID\" -TenantId \"$TENANT_ID\"\n   ```\n\nFull rationale: [references\u002Fpost-deploy-manual-steps.md](.\u002Freferences\u002Fpost-deploy-manual-steps.md).\n\n### Step 8 — Verify\n\nTutorial [§12](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md#12-phase-8--verify). Autonomous `curl` returns real weather; OBO works via MSAL popup; CloudTrail shows `AssumeRoleWithWebIdentity` events with `identityProvider = sts.windows.net\u002F\u003Ctenant>\u002F`.\n\n## One-Shot Orchestrator\n\nIf all prerequisites are in place and variables are confirmed, run:\n\n```bash\nbash .claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fdeploy-aca-aws.sh\n```\n\nThis is idempotent and invokes steps 2–6 in order. Steps 0, 1, and 7 require human decisions and remain manual.\n\n## Key Artifacts (what you'll end up with)\n\nPersisted in `\u002Ftmp\u002Fdeploy-vars.sh`:\n\n| Variable | Example |\n|---|---|\n| `TENANT_ID`, `SUBSCRIPTION_ID`, `AWS_ACCOUNT_ID` | (user-provided) |\n| `BLUEPRINT_APP_ID`, `AGENT_CLIENT_ID`, `CLIENT_SPA_APP_ID` | from Step 1 |\n| `MI_OBJECT_ID`, `APP_FQDN` | from Step 2 |\n| `STS_APP_ID`, `STS_APP_URI`, `STS_SP_OID`, `AWS_ROLE_ARN`, `V1_OIDC_ARN` | from Step 4 |\n\n**No client secrets, no AWS access keys**, anywhere.\n\n## References\n\n- [Architecture summary](.\u002Freferences\u002Farchitecture.md)\n- [SKU and sizing decisions](.\u002Freferences\u002Fsku-sizing.md)\n- [Why the AWS leg needs a v1 token exchange](.\u002Freferences\u002Fv1-token-exchange.md)\n- [Post-deploy manual steps (SPA URI + OBO consent)](.\u002Freferences\u002Fpost-deploy-manual-steps.md)\n- [Troubleshooting matrix](.\u002Freferences\u002Ftroubleshooting.md)\n- [Full tutorial](..\u002F..\u002F..\u002Fsidecar\u002Faws\u002Fdeploy-aws-bedrock-agent-sidecar-container-apps.md)\n",{"name":5,"description":7},"main","ce211acbb1781de04882eda398e7d5187f6832d1",".claude\u002Fskills\u002Fdeploy-agent-aca-aws",8,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-08-06 00:26:28",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add microsoft\u002Fentra-agentid-samples --skill deploy-agent-aca-aws",{"tool":59,"command":60},"bunx","bunx skills add microsoft\u002Fentra-agentid-samples --skill deploy-agent-aca-aws",{"tool":62,"command":63},"pnpm","pnpm dlx skills add microsoft\u002Fentra-agentid-samples --skill deploy-agent-aca-aws","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002FSKILL.md",true,[67,73,77,81,85,89,95,99,103,107,111,115,119],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Farchitecture.md","REFERENCE","参考文档",1485,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Freferences\u002Farchitecture.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fpost-deploy-manual-steps.md",1955,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Freferences\u002Fpost-deploy-manual-steps.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fsku-sizing.md",5601,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Freferences\u002Fsku-sizing.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Ftroubleshooting.md",4486,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Freferences\u002Ftroubleshooting.md",{"path":86,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fv1-token-exchange.md",2968,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Freferences\u002Fv1-token-exchange.md",{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fadd-spa-redirect-uri.sh","SCRIPT","脚本",1117,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fadd-spa-redirect-uri.sh",{"path":96,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fcontainerapp.yaml.template",3411,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fcontainerapp.yaml.template",{"path":100,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":101,"sourceHtmlUrl":102},"scripts\u002Fdeploy-aca-aws.sh",9172,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fdeploy-aca-aws.sh",{"path":104,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fdeploy-vars.sh.template",2760,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fdeploy-vars.sh.template",{"path":108,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Fgrant-agent-obo-consent.ps1",1599,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fgrant-agent-obo-consent.ps1",{"path":112,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":113,"sourceHtmlUrl":114},"scripts\u002Fsetup-iam-role.sh",3175,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-iam-role.sh",{"path":116,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":117,"sourceHtmlUrl":118},"scripts\u002Fsetup-intermediary-app.sh",2212,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-intermediary-app.sh",{"path":120,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":121,"sourceHtmlUrl":122},"scripts\u002Fsetup-obo-blueprint-for-aca.ps1",2966,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-aws\u002Fscripts\u002Fsetup-obo-blueprint-for-aca.ps1",[124,137,147,157],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":132,"publishedAt":39},"01M69BG5FWSASJKDQ4232N0HNF","teardown-agent-aca-dev","AI-led teardown of the local-LLM (Ollama) sample agent deployment on Azure Container Apps created by deploy-agent-aca-dev. Use when the user wants to delete the dev sample ACA deployment, clean up the resource group, or optionally delete the Blueprint \u002F Agent Identity \u002F Client SPA. Defaults to DRY-RUN and keeps Entra objects unless the user explicitly opts in. NOT for local docker-compose (use `docker compose down -v`) and NOT for the AWS Bedrock variant (use teardown-agent-aca-aws).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fteardown-agent-aca-dev\u002FSKILL.md",[130,131],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[133,134,35,27,31,36,30,135,136],"teardown agent aca dev","docker compose","delete","run",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":145,"publishedAt":39},"01M69BG3F1RT6STV6GERQ8AK7Q","teardown-agent-aca-aws","AI-led teardown of the AWS Bedrock sample agent deployment on Azure Container Apps created by deploy-agent-aca-aws. Use when the user wants to delete the AWS sample ACA deployment, clean up the resource group, remove the AWS IAM role + OIDC provider, delete the intermediary Entra app, or optionally delete the Blueprint \u002F Agent Identity \u002F Client SPA. Defaults to DRY-RUN and keeps Entra\u002FAWS objects unless the user explicitly opts in. NOT for local docker-compose (no cloud resources to delete) and NOT for GCP (pending).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fteardown-agent-aca-aws\u002FSKILL.md",[143,144],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[146,136,30,135,36,35,27,31],"teardown agent aca aws",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":154,"publishedAt":39},"01M69BG0YJ1YKC9FYRNNXMY4ZF","entra-agent-id-setup","AI-guided setup for Microsoft Entra Agent ID. Use when the user wants to provision an Agent Identity Blueprint, Agent Identity, and OBO client app in an Entra tenant; when configuring the dev\u002FAWS\u002FGCP sidecar stack; when debugging 403 Authorization_RequestDenied on blueprint creation; when checking which Entra role is required (Global Admin \u002F Agent ID Administrator \u002F Agent ID Developer); when running Start-EntraAgentIDWorkflow \u002F setup-obo-client-app \u002F setup-obo-blueprint.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fentra-agent-id-setup\u002FSKILL.md",[153],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[155,33,32,156,31,9],"entra agent id setup","debugging",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":165,"publishedAt":39},"01M69BFXMDA70Q4P5KZDKY97YF","deploy-agent-aca-dev","AI-led deployment of the local-LLM sample agent (Ollama + Microsoft Entra Agent ID sidecar) to Azure Container Apps. Use when the user wants to deploy sidecar\u002Fdev to ACA, run the agent on Azure without AWS\u002FGCP, host Ollama on Container Apps, promote the docker-compose local-dev stack from ClientSecret to SignedAssertionFromManagedIdentity (secretless), or debug AADSTS65001\u002FAADSTS50011\u002FImagePullBackOff\u002FOllama OOM errors in this specific deployment. NOT for AWS Bedrock (use deploy-agent-aca-aws) and NOT for local docker-compose on a laptop (use sidecar\u002Fdev directly). Chains to entra-agent-id-setup for the Blueprint + Agent Identity + Client SPA objects.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fentra-agentid-samples\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdeploy-agent-aca-dev\u002FSKILL.md",[163,164],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[166,27,30,136,36,35,34,33,32,31,9],"deploy agent aca dev"]