> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devinenterprise.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Devin for AWS Transform

> Aggiungi Devin ai job di modernizzazione di AWS Transform per eseguire build e test del codice trasformato e consegnarlo come pull request

Devin for AWS Transform integra Devin in [AWS Transform](https://aws.amazon.com/transform/) come agente partner. In un job di AWS Transform, Devin esegue build e test dell'output della trasformazione sul tuo repository e lo consegna sotto forma di pull request. Crea inoltre le pipeline CI/CD e l'infrastruttura come codice per distribuire su Amazon ECS, Amazon EKS, Amazon EC2 o AWS Lambda. Il tuo team approva tutto direttamente in AWS Transform.

> [!NOTE]
>
> L'offerta è **gratuita su AWS Marketplace con una licenza Devin esterna**. L'utilizzo di Devin viene fatturato tramite il tuo abbonamento Devin e si applicano i costi standard dell'infrastruttura AWS (AgentCore Runtime, Secrets Manager, CloudWatch). Puoi sottoscrivere un abbonamento Devin tramite [Devin by Cognition su AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-yt3ntkdpdjdgm).

## Come funziona

L'integrazione è composta da due parti:

* **Il connettore** è un container che esegui nel **tuo account AWS** su Amazon Bedrock AgentCore Runtime. AWS Transform lo richiama tramite un ruolo IAM che crei tu. Fa da tramite tra AWS Transform e Devin per la chat del job, gli artefatti, gli aggiornamenti di avanzamento e le attività di revisione.
* **Devin** viene eseguito nell'ambiente di Cognition nell'ambito del tuo abbonamento Devin. Esegue commit solo tramite la tua connessione esistente al controllo del codice sorgente, sotto forma di pull request che approvi tu.

All'interno di un job di AWS Transform:

1. Seleziona **Devin: build, test, distribuire** e fornisci gli artefatti di modernizzazione e il repository connesso.
2. Definisci l'ambito con Devin nella chat del job. L'avanzamento viene mostrato nelle sezioni **Plan** e **Worklogs** del job.
3. Devin propone un piano e ti sottopone le decisioni come **attività di revisione** di AWS Transform. Le questioni ancora aperte restano nella chat.
4. Devin applica gli artefatti trasformati su un branch di base separato, ne esegue la build e i test e apre le pull request. Approvi ciascuna di esse tramite un'attività di revisione.
5. Il tuo team distribuisce tramite la propria pipeline già revisionata, utilizzando i propri ruoli AWS IAM.

## Modello di sicurezza

* **Nessuna chiave di accesso AWS a lunga durata.** Esegui l'installazione con le credenziali di breve durata di un amministratore, oppure lascia che sia Devin a installare tramite federazione OIDC senza chiavi.
* **Ruoli separati.** L'installazione, il runtime e AWS Transform usano ciascuno un proprio ruolo. I due ruoli del runtime sono vincolati da un permissions boundary che distribuisci per primo.
* **Chiave API di Devin in Secrets Manager.** Il runtime legge la chiave all'avvio. La chiave non compare mai nei parametri dello stack, nella chat, nei log o in git.
* **Restrizioni sui repository.** Puoi limitare i repository in cui Devin può aprire pull request.
* **Immagine con hardening.** Il container non include shell né gestore di pacchetti, viene eseguito come utente non root, viene sottoposto a scansione prima del rilascio e viene fornito con SBOM.
* **Solo traffico in uscita.** Il runtime richiede connessioni HTTPS in uscita verso l'API di Devin e gli endpoint AWS e non accetta traffico in ingresso, a eccezione delle invocazioni di AgentCore.

## Prerequisiti

* Un account AWS con AWS Transform abilitato in `us-east-1`, attualmente l'unica regione supportata. Usalo per il runtime, il segreto e i tuoi job.
* Un amministratore AWS in grado di distribuire stack CloudFormation che creano ruoli IAM.
* AWS CLI v2, configurata con le credenziali di tale amministratore.
* Un'organizzazione Devin con i repository sorgente di destinazione già connessi.
* Un **utente di servizio** Devin per il runtime, con una chiave API dotata delle autorizzazioni **ViewOrgSessions**, **UseDevinSessions** e **ManageOrgSessions**. Prendi nota dell'**ID dell'organizzazione** Devin.

## Configurazione

Con questi passaggi installi tu stesso il connettore tramite la AWS CLI. Per far eseguire a Devin i passaggi da 3 a 6 al posto tuo, consulta [Facoltativo: lascia che sia Devin a installarlo](#optional-let-devin-install-it).

**1. Abbonati su AWS Marketplace**

Abbonati a [**Devin for AWS Transform: Modernization Agent**](https://aws.amazon.com/marketplace/pp/prodview-rfmglejkakmb6) su AWS Marketplace. Nella pagina di fulfillment, copia l'URI dell'immagine e l'ARN del repository dell'immagine, quindi salvali nella tua shell come `IMAGE_URI` e `MARKETPLACE_REPO_ARN`, che verranno usati dai comandi riportati di seguito. Il tag alla fine dell'URI dell'immagine corrisponde alla **versione** che inserirai successivamente in AWS Transform.

**2. Richiedi l'inserimento del tuo account AWS nell'elenco di elementi consentiti**

[Contattaci](https://devin.ai/contact) per aggiungere il tuo account AWS all'elenco di elementi consentiti. Indica:

* L'ID a 12 cifre del tuo account AWS
* La regione che userai (`us-east-1`)
* Il nome della tua organizzazione Devin

Dopo che l'account è stato aggiunto all'elenco di elementi consentiti, apri la console di AWS Transform e vai a **Partner agents**.

![Navigazione della console di AWS Transform con Partner agents](https://mintcdn.com/cognitionai-enterprise/sULjogBmcfeG3jdB/images/integrations/aws-transform/console-nav.png?fit=max\&auto=format\&n=sULjogBmcfeG3jdB\&q=85\&s=8eeffffc22287479ea05491e141d51e4)

**devin-modernization** ora compare con lo stato **Pending configuration**. Lascialo in questo stato mentre distribuisci e verifichi il runtime nei passaggi da 3 a 6. Lo configurerai nel passaggio 7.

![Elenco Partner agents con devin-modernization nello stato Pending configuration](https://mintcdn.com/cognitionai-enterprise/sULjogBmcfeG3jdB/images/integrations/aws-transform/partner-agents-pending.png?fit=max\&auto=format\&n=sULjogBmcfeG3jdB\&q=85\&s=c08e8670de557c28aee6e4cd4ae1ad32)

**3. Salva la chiave API di Devin in Secrets Manager**

Salva la chiave API dell'utente di servizio del runtime (inizia con `cog_`) come segreto in testo normale denominato `devin-atx/devin-api-key`:

```bash theme={null}
export AWS_REGION=us-east-1
read -rs DEVIN_KEY   # incolla la chiave, premi Invio
aws secretsmanager create-secret --region "$AWS_REGION" --name devin-atx/devin-api-key --secret-string "$DEVIN_KEY"
unset DEVIN_KEY
```

Puoi anche crearlo nella console di Secrets Manager: seleziona **Other type of secret**, poi **Plaintext** e incolla la chiave.

**4. Distribuisci il limite delle autorizzazioni**

Salva il [template del permissions boundary](#permissions-boundary-template) riportato di seguito come `boundary.yaml` e distribuiscilo. Il template crea la policy `devin-atx-boundary`, che stabilisce il limite massimo delle azioni consentite a ciascuno dei due ruoli di runtime. Il parametro `MarketplaceImageRepository` accetta l'ARN del repository indicato nella tua pagina di fulfillment e il boundary consente il pull delle immagini solo da quel repository.

```bash theme={null}
aws cloudformation deploy --region "$AWS_REGION" \
  --stack-name devin-atx-boundary \
  --template-file boundary.yaml \
  --capabilities CAPABILITY_NAMED_IAM \
  --parameter-overrides MarketplaceImageRepository="$MARKETPLACE_REPO_ARN"
```

**5. Distribuisci il runtime**

Salva il [template runtime](#runtime-template) riportato di seguito come `runtime.yaml`. Crea un change set, esaminalo, quindi eseguilo:

```bash theme={null}
aws cloudformation deploy --region "$AWS_REGION" \
  --stack-name devin-atx-runtime \
  --template-file runtime.yaml \
  --capabilities CAPABILITY_NAMED_IAM \
  --no-execute-changeset \
  --parameter-overrides \
    ImageUri="$IMAGE_URI" \
    DevinOrgId="<devin-org-id>" \
    DevinTargetRepos="<owner/repo,owner/other-repo>"
# Esamina il change set restituito, quindi:
aws cloudformation execute-change-set --region "$AWS_REGION" \
  --change-set-name <change-set-arn-from-output>
aws cloudformation wait stack-create-complete --region "$AWS_REGION" \
  --stack-name devin-atx-runtime
```

| Parametro | Obbligatorio | Valore |
| - | - | - |
| `ImageUri` | Sì | L'URI con versione dell'immagine, indicato nella pagina di fulfillment del Marketplace |
| `DevinOrgId` | Sì | L'ID della tua organizzazione Devin |
| `DevinTargetRepos` | Consigliato | Elenco separato da virgole di `owner/repo` in cui Devin può aprire pull request. Se vuoto, è consentito qualsiasi repository connesso |
| `DevinPlaybookId` | No | Un playbook di Devin da allegare a ogni sessione |
| `DevinApiBaseUrl` | Solo Enterprise | L'URL di base della tua API di Devin. Se vuoto, viene usato `https://api.devin.ai` |
| `DevinWebUrl` | Solo Enterprise | L'URL della tua applicazione web di Devin, usato per i collegamenti alle sessioni. Se vuoto, viene usato `https://app.devin.ai` |
| `DevinApiKeySecretName` | No | Il valore predefinito è `devin-atx/devin-api-key`. Deve iniziare con `devin-atx/`, l'unico prefisso consentito dal limite delle autorizzazioni |
| `BoundaryPolicyName` | No | Il valore predefinito è `devin-atx-boundary` |

Lo stack crea il runtime AgentCore `devin_atx_orchestrator`, il relativo ruolo di esecuzione `devin-atx-agentcore-execution` e il ruolo di invocazione di AWS Transform `devin-atx-transform-invoke`. Recupera dagli output dello stack i due ARN che ti serviranno nel passaggio successivo:

```bash theme={null}
aws cloudformation describe-stacks --region "$AWS_REGION" \
  --stack-name devin-atx-runtime \
  --query "Stacks[0].Outputs[?OutputKey=='RuntimeArn' || OutputKey=='InvokeRoleArn']" \
  --output table
```

**6. Verifica il runtime**

Invoca il self-check del runtime, che legge la chiave di Devin da Secrets Manager ed esegue un'unica chiamata API di sola lettura all'API di Devin:

```bash theme={null}
aws bedrock-agentcore invoke-agent-runtime --region "$AWS_REGION" \
  --agent-runtime-arn "<RuntimeArn>" \
  --qualifier DEFAULT \
  --runtime-session-id "$(uuidgen | tr -d -)selfcheck" \
  --content-type application/json --accept application/json \
  --cli-binary-format raw-in-base64-out \
  --payload '{"jsonrpc":"2.0","id":"selfcheck","method":"devin_atx/selfcheck","params":{}}' \
  selfcheck.json
cat selfcheck.json
```

Un runtime funzionante restituisce `"ok": true` con `"devinKey": "pass"` e `"devinApi": "pass"`. Se uno dei due controlli non va a buon fine, consulta [Risoluzione dei problemi](#troubleshooting).

**7. Configura l'agente partner in AWS Transform**

Torna a **Partner agents**, seleziona **devin-modernization** (ancora in **Pending configuration**) e scegli **Configure**. Inserisci:

* **Agent Version:** la versione ottenuta al passaggio 1
* **Runtime ARN:** l'output `RuntimeArn` dello stack
* **Role ARN:** l'output `InvokeRoleArn` dello stack

Scegli **Update**.

![Modulo di configurazione dell'agente con Agent Version, Runtime ARN e Role ARN](https://mintcdn.com/cognitionai-enterprise/sULjogBmcfeG3jdB/images/integrations/aws-transform/configure-agent.png?fit=max\&auto=format\&n=sULjogBmcfeG3jdB\&q=85\&s=9ad471c47656b0a7bd7514a5e841b4ac)

Lo stato diventa **Enabled**.

![Elenco Partner agents con devin-modernization in stato Enabled](https://mintcdn.com/cognitionai-enterprise/sULjogBmcfeG3jdB/images/integrations/aws-transform/partner-agents-enabled.png?fit=max\&auto=format\&n=sULjogBmcfeG3jdB\&q=85\&s=ac5eac3951ac720f8ef7ab5ae7be4138)

![Dettagli dell'agente devin-modernization con versione, runtime ARN e role ARN](https://mintcdn.com/cognitionai-enterprise/sULjogBmcfeG3jdB/images/integrations/aws-transform/agent-details-enabled.png?fit=max\&auto=format\&n=sULjogBmcfeG3jdB\&q=85\&s=40ecc2e0fbc3bf0cb474738e14b16c40)

**8. Avvia un job**

Crea un job di AWS Transform e seleziona **Devin: build, test, deploy**. Fornisci gli artefatti di modernizzazione e il repository collegato, quindi definisci l'ambito nella chat del job. Esamina il piano e ogni pull request tramite le attività di revisione del job.

## Aggiornamento e manutenzione

* **Nuova versione:** ridistribuisci lo stack di runtime con il nuovo `ImageUri`, esegui l'autoverifica, quindi imposta la nuova **Agent Version** in **Configura**.
* **Rotazione della chiave:** incolla la nuova chiave nel segreto dalla console di Secrets Manager, oppure esegui i comandi del passaggio 3 usando `put-secret-value --secret-id` al posto di `create-secret --name`. Infine esegui di nuovo l'autoverifica.
* **Repository consentiti:** ridistribuisci lo stack di runtime con un nuovo valore per `DevinTargetRepos`.
* **Disinstallazione:** in AWS Transform, scegli **Disable** sull'agente partner, quindi elimina lo stack `devin-atx-runtime`, lo stack del boundary (oppure lo stack della policy dell'installer, se l'ha installato Devin) e il segreto.

## Risoluzione dei problemi

| Sintomo | Causa probabile |
| - | - |
| **devin-modernization** non compare in Partner agents | L'account non è ancora nell'elenco di elementi consentiti oppure ti trovi in una regione diversa. [Contattaci](https://devin.ai/contact) indicando l'ID del tuo account. |
| Lo stack non supera la regola `SupportedRegion` | La regione non è supportata. Usa `us-east-1`. |
| Lo stack non riesce a creare un ruolo e restituisce un errore di permissions boundary | Distribuisci prima lo stack del boundary, nello stesso account e nella stessa regione. |
| Il runtime non si avvia o non riesce a scaricare l'immagine | La sottoscrizione al Marketplace non è attiva, oppure `ImageUri` e `MarketplaceImageRepository` non corrispondono all'immagine indicata nella tua pagina di fulfillment. |
| L'auto-verifica `devinKey` non riesce | Il segreto è mancante, vuoto o non in testo semplice, oppure `DevinApiKeySecretName` non corrisponde. |
| L'auto-verifica `devinKey` non riesce con un errore KMS `AccessDenied` | Il segreto è crittografato con una chiave KMS gestita dal cliente e il ruolo di esecuzione non ha l'autorizzazione a decrittografarla. Usa la chiave di Secrets Manager gestita da AWS. |
| L'auto-verifica `devinApi` restituisce 403 | Alla chiave dell'utente di servizio manca l'autorizzazione **ViewOrgSessions**. |
| L'auto-verifica `devinApi` restituisce 404 o un errore di connessione | `DevinApiBaseUrl` errato per un host Enterprise, oppure manca la connettività HTTPS in uscita. |
| Le chiamate successive ad AWS Transform restituiscono `TerminalResourceException` | La sessione Devin del job è terminata. Avvia un nuovo job. |

I log del runtime si trovano in CloudWatch in `/aws/bedrock-agentcore/runtimes/<runtime-id>-DEFAULT`. Quando contatti Cognition, indica i RequestId AWS e l'orario dell'errore. Non includere mai chiavi API o token OIDC.

## Template

### Template per il permissions boundary

> [accordion] boundary.yaml
>
> ```yaml theme={null}
> AWSTemplateFormatVersion: '2010-09-09'
> Description: Permissions boundary for the Devin for AWS Transform AgentCore execution and Transform invocation roles.
> Parameters:
>   MarketplaceImageRepository:
>     Type: String
>     AllowedPattern: 'arn:aws[a-z-]*:ecr:[a-z0-9-]+:[0-9]{12}:repository/.+'
>     Description: ECR repository ARN of the image on your AWS Marketplace fulfillment page.
>   ResourcePrefix:
>     Type: String
>     Default: devin-atx
>     AllowedPattern: '[a-z][a-z0-9-]{2,20}'
>     Description: Prefix for every stack, role, repository and secret Devin manages.
>   RuntimeName:
>     Type: String
>     Default: devin_atx_orchestrator
>     AllowedPattern: '[a-zA-Z][a-zA-Z0-9_]{0,47}'
>     Description: AgentRuntimeName of the orchestrator in runtime.yaml.
> Resources:
>   RoleBoundary:
>     Type: AWS::IAM::ManagedPolicy
>     Metadata:
>       cfn-lint:
>         config:
>           ignore_checks: [W3037]  # transform-agents/transform-registry non sono ancora prefissi IAM pubblici
>     Properties:
>       ManagedPolicyName: !Sub ${ResourcePrefix}-boundary
>       Description: Maximum permissions for the AgentCore execution and Transform invocation roles Devin creates.
>       PolicyDocument:
>         Version: '2012-10-17'
>         Statement:
>           - Sid: EcrPull
>             Effect: Allow
>             Action: [ecr:BatchGetImage, ecr:GetDownloadUrlForLayer]
>             Resource:
>               - !Sub arn:${AWS::Partition}:ecr:${AWS::Region}:${AWS::AccountId}:repository/${ResourcePrefix}/*
>               - !Ref MarketplaceImageRepository
>           - Sid: EcrToken
>             Effect: Allow
>             Action: ecr:GetAuthorizationToken
>             Resource: '*'
>           - Sid: RuntimeLogs
>             Effect: Allow
>             Action: [logs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEvents, logs:DescribeLogStreams]
>             Resource:
>               - !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/bedrock-agentcore/runtimes/*
>               - !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/bedrock-agentcore/runtimes/*:log-stream:*
>           - Sid: DescribeLogGroups
>             Effect: Allow
>             Action: logs:DescribeLogGroups
>             Resource: !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:*
>           - Sid: Tracing
>             Effect: Allow
>             Action: [xray:PutTraceSegments, xray:PutTelemetryRecords, xray:GetSamplingRules, xray:GetSamplingTargets]
>             Resource: '*'
>           - Sid: Metrics
>             Effect: Allow
>             Action: cloudwatch:PutMetricData
>             Resource: '*'
>             Condition:
>               StringEquals:
>                 cloudwatch:namespace: bedrock-agentcore
>           - Sid: GetAgentAccessToken
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:GetWorkloadAccessToken
>               - bedrock-agentcore:GetWorkloadAccessTokenForJWT
>               - bedrock-agentcore:GetWorkloadAccessTokenForUserId
>             Resource:
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default/workload-identity/*
>           - Sid: OrchestratorRuntime
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:InvokeAgentRuntime
>               - bedrock-agentcore:GetAgentRuntime
>               - bedrock-agentcore:GetAgentRuntimeEndpoint
>               - bedrock-agentcore:StopRuntimeSession
>             Resource:
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:runtime/${RuntimeName}-*
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:runtime/${RuntimeName}-*/runtime-endpoint/*
>           - Sid: AgentCoreRuntimeDiscovery
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:ListAgentRuntimeEndpoints
>               - bedrock-agentcore:ListAgentRuntimeVersions
>               - bedrock-agentcore:ListAgentRuntimes
>             Resource: '*'
>           - Sid: DevinKey
>             Effect: Allow
>             Action: secretsmanager:GetSecretValue
>             Resource: !Sub arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${ResourcePrefix}/*
>           - Sid: TransformApis
>             Effect: Allow
>             Action:
>               - transform-agents:ListJobPlanSteps
>               - transform-agents:PutJobPlan
>               - transform-agents:UpdateJobPlanStep
>               - transform-agents:CreateWorklog
>               - transform-agents:SendMessage
>               - transform-agents:ListArtifacts
>               - transform-agents:CreateArtifactUploadUrl
>               - transform-agents:GetArtifactMetadata
>               - transform-agents:CompleteArtifactUpload
>               - transform-agents:CreateArtifactDownloadUrl
>               - transform-agents:GetJob
>               - transform-agents:UpdateJobStatus
>               - transform-agents:CreateHitlTask
>               - transform-agents:StartHitlTask
>               - transform-agents:GetHitlTask
>               - transform-agents:CloseHitlTask
>               - transform-agents:GetAgentInstance
>               - transform-agents:UpdateAgentInstance
>               - transform-agents:RefreshAuthToken
>             Resource: '*'
> Outputs:
>   BoundaryPolicyArn:
>     Value: !Ref RoleBoundary
> ```

### Template di runtime

> [accordion] runtime.yaml
>
> ```yaml theme={null}
> AWSTemplateFormatVersion: '2010-09-09'
> Description: AgentCore runtime and AWS Transform invocation roles for the Devin orchestrator.
> Parameters:
>   ResourcePrefix:
>     Type: String
>     Default: devin-atx
>   ImageUri:
>     Type: String
>     Description: Versioned image URI from your AWS Marketplace fulfillment page.
>   DevinOrgId:
>     Type: String
>   DevinTargetRepos:
>     Type: String
>     Default: ''
>   DevinPlaybookId:
>     Type: String
>     Default: ''
>   DevinApiBaseUrl:
>     Type: String
>     Default: ''
>   DevinWebUrl:
>     Type: String
>     Default: ''
>   DevinApiKeySecretName:
>     Type: String
>     Default: devin-atx/devin-api-key
>   BoundaryPolicyName:
>     Type: String
>     Default: devin-atx-boundary
> Mappings:
>   TransformRegions:
>     us-east-1:
>       ServicePrincipal: prod.us-east-1.compute.elastic-gumby.aws.internal
> Rules:
>   SupportedRegion:
>     Assertions:
>       - Assert:
>           Fn::Contains:
>             - [us-east-1]
>             - !Ref AWS::Region
>         AssertDescription: Choose a supported region listed in Mappings.TransformRegions.
> Resources:
>   AgentCoreExecutionRole:
>     Type: AWS::IAM::Role
>     Metadata:
>       cfn-lint:
>         config:
>           ignore_checks: [W3037] # transform-agents non è ancora un prefisso IAM pubblico
>     Properties:
>       RoleName: !Sub ${ResourcePrefix}-agentcore-execution
>       PermissionsBoundary: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${BoundaryPolicyName}
>       AssumeRolePolicyDocument:
>         Version: '2012-10-17'
>         Statement:
>           - Effect: Allow
>             Principal:
>               Service: bedrock-agentcore.amazonaws.com
>             Action: sts:AssumeRole
>             Condition:
>               StringEquals:
>                 aws:SourceAccount: !Ref AWS::AccountId
>       Policies:
>         - PolicyName: AgentCoreExecutionPolicy
>           PolicyDocument:
>             Version: '2012-10-17'
>             Statement:
>               - Sid: ECRImageAccess
>                 Effect: Allow
>                 Action: [ecr:BatchGetImage, ecr:GetDownloadUrlForLayer]
>                 Resource: !Sub arn:${AWS::Partition}:ecr:${AWS::Region}:${AWS::AccountId}:repository/${ResourcePrefix}/*
>               - Sid: MarketplaceImageAccess
>                 Effect: Allow
>                 Action: [ecr:BatchGetImage, ecr:GetDownloadUrlForLayer]
>                 Resource: !Sub
>                   - arn:${AWS::Partition}:ecr:${ImageRegion}:${ImageAccount}:repository/${ImageRepository}
>                   - ImageAccount: !Select [0, !Split ['.', !Select [0, !Split ['/', !Ref ImageUri]]]]
>                     ImageRegion: !Select [3, !Split ['.', !Select [0, !Split ['/', !Ref ImageUri]]]]
>                     ImageRepository: !Select [0, !Split [':', !Select [0, !Split ['@', !Select [1, !Split ['.amazonaws.com/', !Ref ImageUri]]]]]]
>               - Sid: RuntimeLogs
>                 Effect: Allow
>                 Action: [logs:DescribeLogStreams, logs:CreateLogGroup]
>                 Resource: !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/bedrock-agentcore/runtimes/*
>               - Sid: DescribeLogGroups
>                 Effect: Allow
>                 Action: logs:DescribeLogGroups
>                 Resource: !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:*
>               - Sid: WriteRuntimeLogs
>                 Effect: Allow
>                 Action: [logs:CreateLogStream, logs:PutLogEvents]
>                 Resource: !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/bedrock-agentcore/runtimes/*:log-stream:*
>               - Sid: ECRTokenAccess
>                 Effect: Allow
>                 Action: ecr:GetAuthorizationToken
>                 Resource: '*'
>               - Sid: Tracing
>                 Effect: Allow
>                 Action:
>                   - xray:PutTraceSegments
>                   - xray:PutTelemetryRecords
>                   - xray:GetSamplingRules
>                   - xray:GetSamplingTargets
>                 Resource: '*'
>               - Sid: RuntimeMetrics
>                 Effect: Allow
>                 Action: cloudwatch:PutMetricData
>                 Resource: '*'
>                 Condition:
>                   StringEquals:
>                     cloudwatch:namespace: bedrock-agentcore
>               - Sid: GetAgentAccessToken
>                 Effect: Allow
>                 Action:
>                   - bedrock-agentcore:GetWorkloadAccessToken
>                   - bedrock-agentcore:GetWorkloadAccessTokenForJWT
>                   - bedrock-agentcore:GetWorkloadAccessTokenForUserId
>                 Resource:
>                   - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default
>                   - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default/workload-identity/*
>               - Sid: DevinKey
>                 Effect: Allow
>                 Action: secretsmanager:GetSecretValue
>                 Resource: !Sub arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${DevinApiKeySecretName}-*
>               - Sid: TransformAgentsApiPolicy
>                 Effect: Allow
>                 Action: transform-agents:*
>                 Resource: '*'
>   AgentCoreRuntime:
>     Type: AWS::BedrockAgentCore::Runtime
>     Properties:
>       AgentRuntimeName: devin_atx_orchestrator
>       AgentRuntimeArtifact:
>         ContainerConfiguration:
>           ContainerUri: !Ref ImageUri
>       RoleArn: !GetAtt AgentCoreExecutionRole.Arn
>       NetworkConfiguration:
>         NetworkMode: PUBLIC
>       ProtocolConfiguration: HTTP
>       EnvironmentVariables:
>         STAGE: prod
>         REGION: !Ref AWS::Region
>         DEVIN_ORG_ID: !Ref DevinOrgId
>         DEVIN_API_KEY_SECRET_ID: !Ref DevinApiKeySecretName
>         DEVIN_TARGET_REPOS: !Ref DevinTargetRepos
>         DEVIN_PLAYBOOK_ID: !Ref DevinPlaybookId
>         DEVIN_API_BASE_URL: !Ref DevinApiBaseUrl
>         DEVIN_WEB_URL: !Ref DevinWebUrl
>         USE_EXTERNAL_AGENTIC_API: 'true'
>   TransformInvokeRole:
>     Type: AWS::IAM::Role
>     Properties:
>       RoleName: !Sub ${ResourcePrefix}-transform-invoke
>       PermissionsBoundary: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${BoundaryPolicyName}
>       AssumeRolePolicyDocument:
>         Version: '2012-10-17'
>         Statement:
>           - Effect: Allow
>             Principal:
>               Service: !FindInMap [TransformRegions, !Ref AWS::Region, ServicePrincipal]
>             Action: sts:AssumeRole
>       Policies:
>         - PolicyName: AWSTransform-BedrockAgentRuntimePolicy
>           PolicyDocument:
>             Version: '2012-10-17'
>             Statement:
>               - Sid: AWSTransformAgentCoreRuntimePermissions
>                 Effect: Allow
>                 Action:
>                   - bedrock-agentcore:GetAgentRuntime
>                   - bedrock-agentcore:GetAgentRuntimeEndpoint
>                   - bedrock-agentcore:InvokeAgentRuntime
>                   - bedrock-agentcore:ListAgentRuntimeEndpoints
>                   - bedrock-agentcore:ListAgentRuntimeVersions
>                   - bedrock-agentcore:ListAgentRuntimes
>                   - bedrock-agentcore:StopRuntimeSession
>                 Resource:
>                   - !GetAtt AgentCoreRuntime.AgentRuntimeArn
>                   - !Sub ${AgentCoreRuntime.AgentRuntimeArn}/*
> Outputs:
>   RuntimeArn:
>     Value: !GetAtt AgentCoreRuntime.AgentRuntimeArn
>   ExecutionRoleArn:
>     Value: !GetAtt AgentCoreExecutionRole.Arn
>   InvokeRoleArn:
>     Value: !GetAtt TransformInvokeRole.Arn
> ```

## Facoltativo: lascia che sia Devin a installarlo

Una sessione Devin può eseguire l'installazione al posto tuo, mostrandoti ogni change set e attendendo la tua approvazione. Usa la federazione OIDC senza chiavi: AWS considera attendibili i token della tua organizzazione Devin, ma solo per un utente di servizio dedicato all'installazione.

1. Crea un secondo utente di servizio Devin per l'installazione (distinto dall'utente di servizio di runtime). Annota il relativo ID `service-user-…`.
2. Distribuisci il [template di attendibilità OIDC](#oidc-trust-template) specificando il tuo `DevinOrgId`, il `DevinDeployServiceUserId` dell'installer e `DevinIssuerHost` (`app.devin.ai` o l'host della tua azienda). Il template crea il ruolo `devin-aws-transform-agent`, privo di autorizzazioni.
3. Distribuisci il [template della policy dell'installer](#installer-policy-template) **al posto del** template del boundary. Passa lo stesso `MarketplaceImageRepository` del passaggio 4. Il template crea lo stesso `devin-atx-boundary` e due policy dell'installer con ambito limitato, allegate a quel ruolo.
4. In una sessione avviata come utente di servizio dell'installer, chiedi a Devin di configurare Devin for AWS Transform nel tuo Account AWS e nella tua regione, fornendogli l'URI dell'immagine e l'ARN del repository riportati nella pagina di fulfillment. L'inserimento nella lista consentita e la configurazione dell'agente partner restano comunque a tuo carico.

### Template di attendibilità OIDC

> [accordion] devin-oidc.yaml
>
> ```yaml theme={null}
> AWSTemplateFormatVersion: '2010-09-09'
> Description: Keyless Devin access for an AWS Transform account; no deployment permissions granted.
> Parameters:
>   DevinOrgId:
>     Type: String
>     AllowedPattern: '[A-Za-z0-9-]+'
>     Description: Exact org_id claim from a Devin token, not the account or enterprise ID.
>   DevinDeployServiceUserId:
>     Type: String
>     AllowedPattern: 'service-user-[A-Za-z0-9]+'
>     Description: service_user_id claim of the dedicated Devin service user allowed to deploy; sessions must request the token with subject-keys "org_id service_user_id"; sessions started by humans or other service users do not match.
>   DevinIssuerHost:
>     Type: String
>     AllowedPattern: '[a-z0-9.-]+'
>     Description: "Devin webapp host that issues the OIDC token: app.devin.ai or your enterprise host."
>   RoleName:
>     Type: String
>     Default: devin-aws-transform-agent
>     AllowedPattern: '[A-Za-z0-9+=,.@_-]+'
>     MaxLength: 64
>   CreateOidcProvider:
>     Type: String
>     Default: 'true'
>     AllowedValues: ['true', 'false']
>     Description: Set false if this account already has a provider for the configured issuer with the STS audience.
> Conditions:
>   CreateProvider: !Equals [!Ref CreateOidcProvider, 'true']
> Resources:
>   DevinOidcProvider:
>     Type: AWS::IAM::OIDCProvider
>     Condition: CreateProvider
>     Properties:
>       Url: !Sub https://${DevinIssuerHost}
>       ClientIdList: [sts.amazonaws.com]
>       Tags:
>         - Key: Project
>           Value: devin-aws-transform-agent
>   DevinRole:
>     Type: AWS::IAM::Role
>     Properties:
>       RoleName: !Ref RoleName
>       Description: Devin OIDC role trusted only to the configured org_id and service_user_id; an administrator must separately attach reviewed deployment permissions.
>       MaxSessionDuration: 3600
>       AssumeRolePolicyDocument: !Sub
>         - |
>           {
>             "Version": "2012-10-17",
>             "Statement": [
>               {
>                 "Effect": "Allow",
>                 "Principal": {
>                   "Federated": "${ProviderArn}"
>                 },
>                 "Action": "sts:AssumeRoleWithWebIdentity",
>                 "Condition": {
>                   "StringEquals": {
>                     "${DevinIssuerHost}:aud": "sts.amazonaws.com",
>                     "${DevinIssuerHost}:sub": "org_id:${DevinOrgId}:service_user_id:${DevinDeployServiceUserId}"
>                   }
>                 }
>               }
>             ]
>           }
>         - ProviderArn: !If
>             - CreateProvider
>             - !Ref DevinOidcProvider
>             - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:oidc-provider/${DevinIssuerHost}
>       Tags:
>         - Key: Project
>           Value: devin-aws-transform-agent
> Outputs:
>   DevinRoleArn:
>     Value: !GetAtt DevinRole.Arn
>   OidcProviderArn:
>     Value: !If
>       - CreateProvider
>       - !Ref DevinOidcProvider
>       - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:oidc-provider/${DevinIssuerHost}
> ```

### Template di policy per l'installer

> [accordion] devin-deploy-policy.yaml
>
> ```yaml theme={null}
> AWSTemplateFormatVersion: '2010-09-09'
> Description: >-
>   Installer permissions for the Devin OIDC role.
>   Scoped to the named orchestrator runtime, two bounded roles, devin-atx-* resources, and
>   selected AWS Transform registry and API actions. An administrator deploys this once,
>   after reviewing it.
> Parameters:
>   MarketplaceImageRepository:
>     Type: String
>     AllowedPattern: 'arn:aws[a-z-]*:ecr:[a-z0-9-]+:[0-9]{12}:repository/.+'
>     Description: ECR repository ARN of the image on your AWS Marketplace fulfillment page.
>   DevinRoleName:
>     Type: String
>     Default: devin-aws-transform-agent
>     AllowedPattern: '[A-Za-z0-9+=,.@_-]+'
>     Description: Name of the role created by devin-oidc.yaml.
>   ResourcePrefix:
>     Type: String
>     Default: devin-atx
>     AllowedPattern: '[a-z][a-z0-9-]{2,20}'
>     Description: Prefix for every stack, role, repository and secret Devin manages.
>   RuntimeName:
>     Type: String
>     Default: devin_atx_orchestrator
>     AllowedPattern: '[a-zA-Z][a-zA-Z0-9_]{0,47}'
>     Description: AgentRuntimeName of the orchestrator in runtime.yaml.
> Resources:
>   RoleBoundary:
>     Type: AWS::IAM::ManagedPolicy
>     Metadata:
>       cfn-lint:
>         config:
>           ignore_checks: [W3037]  # transform-agents/transform-registry non sono ancora prefissi IAM pubblici
>     Properties:
>       ManagedPolicyName: !Sub ${ResourcePrefix}-boundary
>       Description: Maximum permissions for the AgentCore execution and Transform invocation roles Devin creates.
>       PolicyDocument:
>         Version: '2012-10-17'
>         Statement:
>           - Sid: EcrPull
>             Effect: Allow
>             Action: [ecr:BatchGetImage, ecr:GetDownloadUrlForLayer]
>             Resource:
>               - !Sub arn:${AWS::Partition}:ecr:${AWS::Region}:${AWS::AccountId}:repository/${ResourcePrefix}/*
>               - !Ref MarketplaceImageRepository
>           - Sid: EcrToken
>             Effect: Allow
>             Action: ecr:GetAuthorizationToken
>             Resource: '*'
>           - Sid: RuntimeLogs
>             Effect: Allow
>             Action: [logs:CreateLogGroup, logs:CreateLogStream, logs:PutLogEvents, logs:DescribeLogStreams]
>             Resource:
>               - !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/bedrock-agentcore/runtimes/*
>               - !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/bedrock-agentcore/runtimes/*:log-stream:*
>           - Sid: DescribeLogGroups
>             Effect: Allow
>             Action: logs:DescribeLogGroups
>             Resource: !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:*
>           - Sid: Tracing
>             Effect: Allow
>             Action: [xray:PutTraceSegments, xray:PutTelemetryRecords, xray:GetSamplingRules, xray:GetSamplingTargets]
>             Resource: '*'
>           - Sid: Metrics
>             Effect: Allow
>             Action: cloudwatch:PutMetricData
>             Resource: '*'
>             Condition:
>               StringEquals:
>                 cloudwatch:namespace: bedrock-agentcore
>           - Sid: GetAgentAccessToken
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:GetWorkloadAccessToken
>               - bedrock-agentcore:GetWorkloadAccessTokenForJWT
>               - bedrock-agentcore:GetWorkloadAccessTokenForUserId
>             Resource:
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default/workload-identity/*
>           - Sid: OrchestratorRuntime
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:InvokeAgentRuntime
>               - bedrock-agentcore:GetAgentRuntime
>               - bedrock-agentcore:GetAgentRuntimeEndpoint
>               - bedrock-agentcore:StopRuntimeSession
>             Resource:
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:runtime/${RuntimeName}-*
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:runtime/${RuntimeName}-*/runtime-endpoint/*
>           - Sid: AgentCoreRuntimeDiscovery
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:ListAgentRuntimeEndpoints
>               - bedrock-agentcore:ListAgentRuntimeVersions
>               - bedrock-agentcore:ListAgentRuntimes
>             Resource: '*'
>           - Sid: DevinKey
>             Effect: Allow
>             Action: secretsmanager:GetSecretValue
>             Resource: !Sub arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${ResourcePrefix}/*
>           - Sid: TransformApis
>             Effect: Allow
>             Action:
>               - transform-agents:ListJobPlanSteps
>               - transform-agents:PutJobPlan
>               - transform-agents:UpdateJobPlanStep
>               - transform-agents:CreateWorklog
>               - transform-agents:SendMessage
>               - transform-agents:ListArtifacts
>               - transform-agents:CreateArtifactUploadUrl
>               - transform-agents:GetArtifactMetadata
>               - transform-agents:CompleteArtifactUpload
>               - transform-agents:CreateArtifactDownloadUrl
>               - transform-agents:GetJob
>               - transform-agents:UpdateJobStatus
>               - transform-agents:CreateHitlTask
>               - transform-agents:StartHitlTask
>               - transform-agents:GetHitlTask
>               - transform-agents:CloseHitlTask
>               - transform-agents:GetAgentInstance
>               - transform-agents:UpdateAgentInstance
>               - transform-agents:RefreshAuthToken
>             Resource: '*'
>   DeployPolicy:
>     Type: AWS::IAM::ManagedPolicy
>     Metadata:
>       cfn-lint:
>         config:
>           ignore_checks: [W3037]  # transform-agents/transform-registry non sono ancora prefissi IAM pubblici
>     Properties:
>       ManagedPolicyName: !Sub ${ResourcePrefix}-devin-deploy
>       Description: Lets Devin build, deploy, register and debug the AWS Transform orchestrator.
>       Roles: [!Ref DevinRoleName]
>       PolicyDocument:
>         Version: '2012-10-17'
>         Statement:
>           - Sid: CloudFormationStacks
>             Effect: Allow
>             Action:
>               - cloudformation:CreateStack
>               - cloudformation:UpdateStack
>               - cloudformation:DeleteStack
>               - cloudformation:CreateChangeSet
>               - cloudformation:DescribeChangeSet
>               - cloudformation:ExecuteChangeSet
>               - cloudformation:DeleteChangeSet
>               - cloudformation:ListChangeSets
>               - cloudformation:DescribeStacks
>               - cloudformation:DescribeStackEvents
>               - cloudformation:DescribeStackResources
>               - cloudformation:GetTemplate
>             Resource: !Sub arn:${AWS::Partition}:cloudformation:${AWS::Region}:${AWS::AccountId}:stack/${ResourcePrefix}-*/*
>           - Sid: CloudFormationRead
>             Effect: Allow
>             Action: [cloudformation:ListStacks, cloudformation:ValidateTemplate, cloudformation:GetTemplateSummary]
>             Resource: '*'
>           - Sid: EcrToken
>             Effect: Allow
>             Action: ecr:GetAuthorizationToken
>             Resource: '*'
>           - Sid: EcrRepositories
>             Effect: Allow
>             Action:
>               - ecr:CreateRepository
>               - ecr:DeleteRepository
>               - ecr:DescribeRepositories
>               - ecr:DescribeImages
>               - ecr:ListImages
>               - ecr:BatchGetImage
>               - ecr:BatchCheckLayerAvailability
>               - ecr:GetDownloadUrlForLayer
>               - ecr:InitiateLayerUpload
>               - ecr:UploadLayerPart
>               - ecr:CompleteLayerUpload
>               - ecr:PutImage
>               - ecr:BatchDeleteImage
>               - ecr:PutLifecyclePolicy
>               - ecr:PutImageScanningConfiguration
>               - ecr:TagResource
>               - ecr:UntagResource
>               - ecr:ListTagsForResource
>             Resource: !Sub arn:${AWS::Partition}:ecr:${AWS::Region}:${AWS::AccountId}:repository/${ResourcePrefix}/*
>           - Sid: CreateBoundedRoles
>             Effect: Allow
>             Action: [iam:CreateRole, iam:PutRolePolicy, iam:AttachRolePolicy, iam:DetachRolePolicy]
>             Resource:
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/${ResourcePrefix}-agentcore-execution
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/${ResourcePrefix}-transform-invoke
>             Condition:
>               StringEquals:
>                 iam:PermissionsBoundary: !Ref RoleBoundary
>           - Sid: ManageOwnRoles
>             Effect: Allow
>             Action:
>               - iam:GetRole
>               - iam:GetRolePolicy
>               - iam:ListRolePolicies
>               - iam:ListAttachedRolePolicies
>               - iam:DeleteRole
>               - iam:DeleteRolePolicy
>               - iam:UpdateRole
>               - iam:TagRole
>               - iam:UntagRole
>             Resource:
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/${ResourcePrefix}-agentcore-execution
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/${ResourcePrefix}-transform-invoke
>           - Sid: PassExecutionRoleToAgentCore
>             Effect: Allow
>             Action: iam:PassRole
>             Resource: !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/${ResourcePrefix}-agentcore-execution
>             Condition:
>               StringEquals:
>                 iam:PassedToService: bedrock-agentcore.amazonaws.com
>           - Sid: ReadPolicies
>             Effect: Allow
>             Action: [iam:GetPolicy, iam:GetPolicyVersion, iam:SimulatePrincipalPolicy]
>             Resource:
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${ResourcePrefix}-*
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:role/${ResourcePrefix}-*
>           - Sid: DevinKeySecret
>             Effect: Allow
>             Action:
>               - secretsmanager:CreateSecret
>               - secretsmanager:DeleteSecret
>               - secretsmanager:DescribeSecret
>               - secretsmanager:PutSecretValue
>               - secretsmanager:UpdateSecret
>               - secretsmanager:TagResource
>               - secretsmanager:UntagResource
>             Resource: !Sub arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:${ResourcePrefix}/*
>           - Sid: RuntimeLogsRead
>             Effect: Allow
>             Action: [logs:DescribeLogStreams, logs:GetLogEvents, logs:FilterLogEvents, logs:StartQuery]
>             Resource: !Sub arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/bedrock-agentcore/*
>           - Sid: LogsDiscovery
>             Effect: Allow
>             Action: [logs:DescribeLogGroups, logs:GetQueryResults]
>             Resource: '*'
>           - Sid: NoBoundaryOrTrustChanges
>             Effect: Deny
>             Action:
>               - iam:DeleteRolePermissionsBoundary
>               - iam:PutRolePermissionsBoundary
>               - iam:UpdateAssumeRolePolicy
>             Resource: '*'
>           - Sid: NoPolicyTampering
>             Effect: Deny
>             Action:
>               - iam:CreatePolicyVersion
>               - iam:DeletePolicy
>               - iam:DeletePolicyVersion
>               - iam:SetDefaultPolicyVersion
>             Resource:
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${ResourcePrefix}-boundary
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${ResourcePrefix}-devin-deploy
>               - !Sub arn:${AWS::Partition}:iam::${AWS::AccountId}:policy/${ResourcePrefix}-devin-deploy-agentcore
>   DeployPolicyAgentCore:
>     Type: AWS::IAM::ManagedPolicy
>     Metadata:
>       cfn-lint:
>         config:
>           ignore_checks: [W3037]  # transform-agents/transform-registry non sono ancora prefissi IAM pubblici
>     Properties:
>       ManagedPolicyName: !Sub ${ResourcePrefix}-devin-deploy-agentcore
>       Description: Lets Devin deploy the AgentCore runtime and call the AWS Transform APIs. Split from DeployPolicy to stay under the IAM policy size limit.
>       Roles: [!Ref DevinRoleName]
>       PolicyDocument:
>         Version: '2012-10-17'
>         Statement:
>           - Sid: AgentCoreServiceLinkedRole
>             Effect: Allow
>             Action: iam:CreateServiceLinkedRole
>             Resource: '*'
>             Condition:
>               StringLike:
>                 iam:AWSServiceName: bedrock-agentcore.amazonaws.com
>           - Sid: AgentCoreNoResourceScope
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:CreateAgentRuntime
>               - bedrock-agentcore:ListAgentRuntimes
>               - bedrock-agentcore:ListAgentRuntimeVersions
>               - bedrock-agentcore:ListAgentRuntimeEndpoints
>             Resource: '*'
>           - Sid: AgentCoreOrchestratorRuntime
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:UpdateAgentRuntime
>               - bedrock-agentcore:DeleteAgentRuntime
>               - bedrock-agentcore:GetAgentRuntime
>               - bedrock-agentcore:CreateAgentRuntimeEndpoint
>               - bedrock-agentcore:UpdateAgentRuntimeEndpoint
>               - bedrock-agentcore:DeleteAgentRuntimeEndpoint
>               - bedrock-agentcore:GetAgentRuntimeEndpoint
>               - bedrock-agentcore:InvokeAgentRuntime
>               - bedrock-agentcore:StopRuntimeSession
>               - bedrock-agentcore:TagResource
>               - bedrock-agentcore:UntagResource
>               - bedrock-agentcore:ListTagsForResource
>             Resource:
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:runtime/${RuntimeName}-*
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:runtime/${RuntimeName}-*/runtime-endpoint/*
>           - Sid: AgentCoreWorkloadIdentity
>             Effect: Allow
>             Action:
>               - bedrock-agentcore:CreateWorkloadIdentity
>               - bedrock-agentcore:GetWorkloadIdentity
>               - bedrock-agentcore:UpdateWorkloadIdentity
>               - bedrock-agentcore:DeleteWorkloadIdentity
>               - bedrock-agentcore:TagResource
>             Resource:
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default
>               - !Sub arn:${AWS::Partition}:bedrock-agentcore:${AWS::Region}:${AWS::AccountId}:workload-identity-directory/default/workload-identity/*
>           - Sid: TransformRegistry
>             Effect: Allow
>             Action:
>               - transform-registry:GetAgent
>               - transform-registry:GetAgentVersion
>               - transform-registry:RegisterAgent
>               - transform-registry:PublishAgentVersion
>               - transform-registry:UpdatePublisherAccessControl
>             Resource: '*'
>           - Sid: TransformApis
>             Effect: Allow
>             Action:
>               - transform-agents:ListJobPlanSteps
>               - transform-agents:PutJobPlan
>               - transform-agents:UpdateJobPlanStep
>               - transform-agents:CreateWorklog
>               - transform-agents:SendMessage
>               - transform-agents:ListArtifacts
>               - transform-agents:CreateArtifactUploadUrl
>               - transform-agents:GetArtifactMetadata
>               - transform-agents:CompleteArtifactUpload
>               - transform-agents:CreateArtifactDownloadUrl
>               - transform-agents:GetJob
>               - transform-agents:UpdateJobStatus
>               - transform-agents:CreateHitlTask
>               - transform-agents:StartHitlTask
>               - transform-agents:GetHitlTask
>               - transform-agents:CloseHitlTask
>               - transform-agents:GetAgentInstance
>               - transform-agents:UpdateAgentInstance
>               - transform-agents:RefreshAuthToken
>             Resource: '*'
>
> Outputs:
>   BoundaryPolicyArn:
>     Value: !Ref RoleBoundary
>   DeployPolicyArn:
>     Value: !Ref DeployPolicy
>   DeployPolicyAgentCoreArn:
>     Value: !Ref DeployPolicyAgentCore
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.