Amazon S3
Upload, download, list, and delete objects in Amazon S3 buckets.
On this page
Connect
Auth type: Credentials form (custom_auth). Fill in the fields the provider needs (listed below). They are stored encrypted in the vault.
| Field | Type | Description |
|---|---|---|
accessKeyIdrequired | text | AWS access key ID |
secretAccessKeyrequired | secret | AWS secret access key |
regionrequired | text | AWS region (e.g. us-east-1) |
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("amazon-s3", "upload-file", {
"file": "<file>"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Amazon S3 answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "amazon-s3-upload-file",
name: "Amazon S3: Upload File",
description: "Calls Amazon S3 when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("amazon-s3", {
"action": "upload-file",
"file": "<file>"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/amazon-s3/upload-file" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"file":"<file>"}}'Actions
upload-filein catalog
Upload File. Upload an File to S3
Also accepted as upload_file.
| Input | Type | Description |
|---|---|---|
filerequired | file | File |
fileNameoptional | text | The File Name to use, if not set the API will try to figure out the file name. |
acloptional | one of "private" | "public-read" | "public-read-write" | "authenticated-read" | "aws-exec-read" | "bucket-owner-read" | "bucket-owner-full-control" | ACL |
typeoptional | text | Content Type of the uploaded file, if not set the API will try to figure out the content type. |
decrypt-pgp-file
Decrypt PGP File. Decrypt a PGP encrypted file from S3 using a private key stored in AWS Secrets Manager
| Input | Type | Description |
|---|---|---|
keyrequired | text | The key (path) of the encrypted file in S3 |
secretArnrequired | text | The ARN of the secret in AWS Secrets Manager containing the PGP private key |
passphraseArnoptional | text | Optional ARN of the secret in AWS Secrets Manager containing the passphrase for the private key (if the key is encrypted) |
secretsManagerRegionoptional | text | The AWS region where the Secrets Manager secret is stored (defaults to S3 region if not provided) |
allowUnauthenticatedMessagesoptional | boolean | Allow decryption of messages without integrity protection (no MDC). WARNING: Without MDC, a malicious actor can silently modify the ciphertext, so the decrypted output may have been tampered with. On… |
allowInsecureDecryptionWithSigningKeysoptional | boolean | Allow decryption using a key not marked for encryption (e.g. a signing-only key). Enable this if your PGP key was not flagged for encryption use. |
deleteFile
Delete File. Deletes an existing file.
| Input | Type | Description |
|---|---|---|
keyrequired | text | The key of the file to delete. |
generate-signed-url
Generate signed URL. Generate a signed URL for a file in a s3 bucket
| Input | Type | Description |
|---|---|---|
keyrequired | text | The path/filename of the file to get |
expiresInrequired | number | How long the URL should remain valid (in minutes). |
list-files
List Files. List all files from an S3 bucket folder/prefix.
| Input | Type | Description |
|---|---|---|
prefixoptional | text | The folder path to list files from (e.g., "folder/"). Leave empty to list from root. |
maxKeysoptional | number | Maximum number of files to return (1-1000) |
moveFile
Move File. Move a File to Another Folder
| Input | Type | Description |
|---|---|---|
fileKeyrequired | text | The key of the file to move |
folderKeyrequired | text | The key of the folder to move the file to |
read-file
Read File. Read a file from S3 to use it in other steps
| Input | Type | Description |
|---|---|---|
keyrequired | text | The key of the file to read |
Details
- Id
amazon-s3- Category
- Data and storage
- Tags
- storage, cloud, aws, files, objects
- Package
@activepieces/piece-amazon-s3@0.5.5- Tier
- Built in