Amazon S3
Upload, download, list, and delete objects in Amazon S3 buckets.
On this page
Connect
Auth type: Credentials form (custom_auth). Pass the fields the provider needs (listed below) as the connection's credentials. They are sealed at rest.
| Field | Type | Description |
|---|---|---|
accessKeyIdrequired | text | AWS access key ID |
secretAccessKeyrequired | secret | AWS secret access key |
regionrequired | text | AWS region (e.g. us-east-1) |
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("amazon-s3", action, input) resolves with the provider's answer and rejects when Amazon S3 isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "amazon-s3"} says whether yours can call it.
// workflows/notify.ts: call Amazon S3 when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellAmazons3 = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Amazon S3 isn't connected.
const output = await step.run("Amazon S3", () =>
step.ctx.integrations.invoke("amazon-s3", "upload-file", {
"file": "<file>"
}),
);
step.ctx.log("Amazon S3 answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "amazon-s3",
"piece_action": "upload-file",
"input": {
"file": "<file>"
},
"env": "dev"
}
}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-file
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- Runs
- Through the integration runner