> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/amazon-web-services-cloud-onboarding/prerequisites-for-onboarding-aws.md).

# Prerequisites for onboarding AWS

Before you begin onboarding AWS to Cortex Cloud, ensure that you have the necessary permissions, credentials, and configuration details.

## Permissions and credentials

Ensure that you have the following permissions and credentials:

* In Cortex Cloud, you must have a Cortex Cloud role with Data Sources - View & Edit permissions to add/configure cloud accounts in Cortex Cloud. This role is included in the following built-in roles: Instance Administrator, Security Admin, and IT Admin.

### Required IAM permissions in AWS

Before deploying CloudFormation stacks, ensure the user or role performing the onboarding has the necessary IAM permissions.

#### Required permissions for onboarding AWS account scope

Use the following template to create a dedicated role with the permissions required for onboarding AWS to Cortex Cloud:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "CortexCloudOnboarding",
      "Effect": "Allow",
      "Action": [
        "iam:GetRole",
        "iam:UpdateAssumeRolePolicy",
        "iam:GetPolicyVersion",
        "iam:GetPolicy",
        "iam:UpdateRoleDescription",
        "iam:DeletePolicy",
        "iam:ListRoles",
        "iam:CreateRole",
        "iam:DeleteRole",
        "iam:AttachRolePolicy",
        "iam:PutRolePolicy",
        "iam:CreatePolicy",
        "iam:PassRole",
        "iam:CreateServiceLinkedRole",
        "iam:DetachRolePolicy",
        "iam:ListPolicyVersions",
        "iam:DeleteRolePolicy",
        "iam:UpdateRole",
        "iam:DeleteServiceLinkedRole",
        "iam:ListRolePolicies",
        "iam:GetRolePolicy",
        "iam:DeletePolicyVersion",
        "iam:SetDefaultPolicyVersion",
        "lambda:*",
        "kms:*",
        "s3:*",
        "sqs:*",
        "sns:*",
        "cloudtrail:*",
        "cloudformation:*"
      ],
      "Resource": "*"
    }
  ]
}

```

#### Additional permissions required for serverless function scanning

To enable serverless function scanning, grant the following permissions in your AWS account for scanning outposts and accessing logs:

```json
{
 "Version": "2012-10-17",
 "Statement": [
   {
     "Effect": "Allow",
     "Action": [
       "lambda:GetFunction",
       "lambda:GetFunctionConfiguration",
       "lambda:GetLayerVersion",
       "iam:GetRole"
     ],
     "Resource": "*"
   }
 ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/cortex-xdr-5.x/configure-cortex-xdr/cortex-xdr-data-sources/cloud-service-provider-csp-onboarding/amazon-web-services-cloud-onboarding/prerequisites-for-onboarding-aws.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
