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

# Allow Artie's VPC on your S3 buckets

> Add Artie's VPC to your S3 bucket policy, so Artie can reach buckets in its data plane's region through an S3 gateway endpoint.

Each Artie cloud data plane reaches S3 buckets in its own region through an S3 gateway endpoint in its VPC. AWS sees these requests as coming from Artie's VPC, not from [Artie's fixed IP addresses](/docs/connection-options#fixed-ip-addresses). If your bucket policy or IAM policy allows Artie only by `aws:SourceIp`, those requests are denied.

This applies to S3, Delta and Iceberg destinations, S3 sources, and staging buckets that are in the same region as your pipeline's data plane. Artie reaches buckets in other regions from its fixed IP addresses.

## Artie VPC IDs

| Data plane           | Region         | VPC ID                  |
| -------------------- | -------------- | ----------------------- |
| `aws-use1`           | us-east-1      | `vpc-030e31508a0a57bc2` |
| `aws-usw2`           | us-west-2      | `vpc-099cfc8796ab9e30c` |
| `aws-eu-west-1`      | eu-west-1      | `vpc-0ac192ad6928ceadc` |
| `aws-eu-west-2`      | eu-west-2      | `vpc-08641dc3d4f7b34ad` |
| `aws-eu-central-1`   | eu-central-1   | `vpc-0d661c8216c725b51` |
| `aws-ap-southeast-2` | ap-southeast-2 | `vpc-004586ce3e5dd8400` |

The examples below use `aws-use1`. Use the IP range from [Fixed IP addresses](/docs/connection-options#fixed-ip-addresses) and the VPC ID for your data plane.

Bring your own cloud (BYOC) deployments don't need this.

## Prerequisites

* An S3 bucket in the same region as your pipeline's data plane
* Permission to edit the bucket's policy
* Permission to edit the IAM role or IAM user that Artie uses for the bucket

## Allow Artie's VPC

**Step 1: Add Artie's VPC to the bucket policy**

Find the statement that restricts access by `aws:SourceIp`. Add `aws:SourceVpc` to that same statement, and keep the IP condition, so Artie can reach the bucket from its fixed IPs and from its VPC.

For a `Deny` statement, add a `StringNotEquals` condition. A `Deny` applies only when all its conditions match, so this statement denies requests that come from neither Artie's IPs nor Artie's VPC:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DenyOutsideArtie",
      "Effect": "Deny",
      "Principal": "*",
      "Action": "s3:*",
      "Resource": [
        "arn:aws:s3:::artie-exports",
        "arn:aws:s3:::artie-exports/*"
      ],
      "Condition": {
        "NotIpAddress": { "aws:SourceIp": ["3.41.128.96/27"] },
        "StringNotEquals": { "aws:SourceVpc": "vpc-030e31508a0a57bc2" }
      }
    }
  ]
}
```

For an `Allow` statement with `IpAddress`, add a second `Allow` statement with the same principal, actions and resources, and the condition `"StringEquals": { "aws:SourceVpc": "vpc-030e31508a0a57bc2" }`.

> **Warning:**
>
> Don't add a separate `Allow` for the VPC next to an IP-only `Deny`. An explicit `Deny` always wins, so requests from Artie's VPC still fail.

**Step 2: Check the IAM policy that Artie uses**

If the IAM role or IAM user that Artie uses has an `aws:SourceIp` condition, change it the same way. AWS allows a request only when the bucket policy and the IAM policy both allow it.

**Step 3: Let Artie read the bucket policy**

Grant `s3:GetBucketPolicy` on the bucket to the IAM role or IAM user that Artie uses. It's read-only. Artie uses it to check that the bucket allows its VPC.

```json
{
  "Effect": "Allow",
  "Action": "s3:GetBucketPolicy",
  "Resource": "arn:aws:s3:::artie-exports"
}
```

For an S3 Tables bucket (Iceberg), grant `s3tables:GetTableBucketPolicy` on the table bucket instead.

## Verify the bucket policy

When you test or save an S3, Delta or Iceberg destination, Artie reads the bucket policy and checks that it allows Artie's VPC. When it doesn't, Artie names the statement to change, for example:

```text
ip_deny_blocks: bucket "artie-exports" policy statement "DenyOutsideArtie" denies by aws:SourceIp, which Artie's S3 traffic will not match: add "aws:SourceVpc": "vpc-030e31508a0a57bc2" under StringNotEquals to that statement
```

When Artie can't read the policy, the message starts with `unreadable` and asks for `s3:GetBucketPolicy`.

Artie checks only the bucket policy. It can't see IAM policies, so check those yourself.

## Related

* [Fixed IP addresses](/docs/connection-options#fixed-ip-addresses): the IP addresses that Artie uses for everything else.
* [S3 destination](/docs/destinations/s3): set up an S3 destination.