---
title: c AWS S3 Storage Service
description: Available connectors
documentId: ipaas-aws-s3-storage-service
locale: en-US
---

The [**AWS S3 Storage Service**](https://camel.apache.org/components/4.10.x/aws2-s3-component.html) component allows you to interact with Amazon S3 (Simple Storage Service) from AWS and manipulate data in S3 buckets directly through integration routes.

**URI syntax**: `aws2-s3://bucketNameOrArn`

## Main fields

*Path parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
|`bucketNameOrArn`(common) | (required) Bucket name or ARN.| — | String |

*Query parameters*

| **Name** | **Description** | **Default** | **Type** |
|----------|---------------|------------|----------|
| `fileName`(consumer)  | To get the object from bucket with the specified file name. | — | String |
| `accessKey`(security) | Amazon AWS access key.                                    | — | String |
| `secretKey`(security) | Amazon AWS secret key.                                      | — | String |

## Example

The flow below uploads a file (with bucket creation) and then deletes a file from AWS S3.

<Steps>
<Step>
  The flow starts with a POST request on the `/store` endpoint.
</Step>
<Step>
   Then it uploads a file to AWS S3:
   - Bucket: `poc-camel-s3`
   - File: `content.txt`
   - Region: `us-east-1`
   - `autoCreateBucket: true`: automatically creates the bucket if it doesn't exist.
   - Authentication: `accessKey` and `secretKey` (stored in variables, indicated by double curly braces). Read about [flow variables](/docs/integrations/ipaas-flow-variables) configuration.
   - Body content is saved to the file.
</Step>
<Step>
  Next, it deletes the file: 
  - Same bucket: `poc-camel-s3`
  - Same file: `content.txt`
  - `autoCreateBucket: false`: doesn't attempt to create bucket (already exists).
  - operation: `deleteObject` (deletion operation)
  - The same file that was created in the previous step is removed.
</Step>
<Step>
   Finally, it sets the response: the body is changed to "It worked" (success confirmation).
</Step>
</Steps>

```yaml
      - from:
          uri: rest:post:/store
          steps:
          - to:
              uri: "aws2-s3://poc-camel-s3"
              parameters:
               autoCreateBucket: true
               region: us-east-1
               accessKey: "{{ACCESS_KEY}}"
               secretKey: "{{SECRET_KEY}}"
               keyName: content.txt    
          - to:
              uri: "aws2-s3://poc-camel-s3"
              parameters:
               autoCreateBucket: false
               region: us-east-1
               accessKey: "{{ACCESS_KEY}}"
               secretKey: "{{SECRET_KEY}}"
               keyName: content.txt    
               operation: deleteObject     
          - setBody:
              expression:
                constant: "It worked"    
```

![](https://creative-ball-51b3fc85c0.media.strapiapp.com/aws3_connector_ba6038bc21.png)


<Callout type="note" title="NOTE">
- When the `autoCreateBucket` parameter is set to `true`, the bucket is created during integration initialization. If any problem occurs in this process, the deployment will fail and remain with **ERROR** status. Possible errors include:

  - Credentials not provided.
  - Invalid credentials (`accessKey`/`secretKey`).
  - Credentials without permission to create buckets.
  - Bucket name already exists in another account.

- If the file already exists, it will be overwritten.

- The `operation` parameter can be used to execute other operations besides upload, as demonstrated in the second step (`deleteObject`).
</Callout>
