The AWS S3 Storage Service 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
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 |
The flow below uploads a file (with bucket creation) and then deletes a file from AWS S3.
The flow starts with a POST request on the /store endpoint.
Then it uploads a file to AWS S3:
poc-camel-s3content.txtus-east-1autoCreateBucket: true: automatically creates the bucket if it doesn't exist.accessKey and secretKey (environment variables)Next, it deletes the file:
poc-camel-s3content.txtautoCreateBucket: false: doesn't attempt to create bucket (already exists).deleteObject (deletion operation)Finally, it sets the response: the body is changed to "It worked" (success confirmation).

NOTE
When the
autoCreateBucketparameter is set totrue, 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
operationparameter can be used to execute other operations besides upload, as demonstrated in the second step (deleteObject).
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more