# S3

This AWS integration allows you to configure CloudTruth External Parameters from an S3 bucket.

## Adding Integrations

{% hint style="info" %}
If you already have a CloudTruth AWS integration you can add AWS S3 by editing the existing account, selecting this integration and adding the[ S3 inline policy](#s3-inline-policy). The [Terraform](/configuration-management/integrations/aws/setup-aws-role.md#use-terraform-to-give-cloudtruth-access) and [CloudFormation](/configuration-management/integrations/aws/setup-aws-role.md#use-cloudformation-to-give-cloudtruth-access) role setup methods automatically create the S3 inline policy.
{% endhint %}

To create a new or additional AWS account click `Add AWS Account` from the Integrations AWS page to bring up the add account pane. Add a name for the AWS account, your specific AWS account ID and the AWS account role name. CloudTruth allows you to select regions where your resources exist, all US regions are enabled by default.

Check the S3 integration and click `Save`.

![](/files/y3lolgUx47sJ1Y0NqeFj)

The AWS account will enter an Integration Error state until the AWS role is configured. An auto generated **External Id** will be created to use in the [AWS Role Creation](/configuration-management/integrations/aws/setup-aws-role.md).

![](/files/-Mk8iEykeQ8D1tgJyu_p)

#### Configuring the AWS Role

With the provided External ID create your AWS Role.

{% content-ref url="/pages/-MWATLnEfo1hmkQ4RC3m" %}
[AWS Role](/configuration-management/integrations/aws/setup-aws-role.md)
{% endcontent-ref %}

## S3 Inline Policy

Adding an Inline Policy to the AWS Role allows CloudTruth secure access to the selected integration service. The inline policy is automatically created if you used [CloudFormation](/configuration-management/integrations/aws/setup-aws-role.md#use-cloudformation-to-give-cloudtruth-access) or [Terraform](/configuration-management/integrations/aws/setup-aws-role.md#use-terraform-to-give-cloudtruth-access) to create the role.

From the [AWS IAM Console](https://console.aws.amazon.com/iam/home) select the role that you created for CloudTruth access.

![](/files/-Mk8iHajFzFlIiwg8yIn)

Click `Add Inline Policy`.

![](/files/eWXtFkich939j0OknCMP)

Click the `JSON` Tab.

![](/files/4eBX1kKs9aurLuzPAFcg)

Paste in the following JSON for the S3 integration policy and click `Review Policy`.

```
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "BucketSelection",
            "Action": [
                "s3:ListAllMyBuckets"
            ],
            "Effect": "Allow",
            "Resource": "*"
        },
        {
            "Sid": "BucketAccess",
            "Action": [
                "s3:GetBucketLocation",
                "s3:ListBucket",
                "s3:GetObject"
            ],
            "Effect": "Allow",
            "Resource": "*"
        }
    ]
}
```

Type in a name for the policy and click `Create Policy.`

![](/files/sxElxUQuSec2Ax1o6N7t)

{% hint style="success" %}
:clap:Setup is now complete for both the AWS Role and Policy. After refreshing by clicking "Check Integration Status" the CloudTruth integration will now show as "Connected", and you can begin creating external [Dynamic Parameter](/configuration-management/parameters/parameter-management/managing-parameters.md#dynamic-parameters) values that reference your AWS resources.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.cloudtruth.com/configuration-management/integrations/aws/s3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
