AWS S3
Add Query
You can add a query step by adding a workflow from the page list.
When you select the AWS S3 data source from the workflow step sidebar, the query input window appears.
See AWS S3 Data Source Guide for more information.
Actions
ListObjects
Retrieves a list of objects in a bucket. For more information, see the AWS S3 official document.
Parameters
Name | Type | Description |
---|---|---|
Bucket (bucket) | string | The name of the bucket to retrieve the list of objects from. |
Start After (startAfter) | string | The starting position of the object list to retrieve. |
Prefix (prefix) | string | The prefix to retrieve the list of objects starting with a specific file name. |
Max Keys (maxKeys) | string | The maximum number of objects to retrieve. |
Query Result
When you run the signed URL generation action, the result is returned in the following structure.
interface Content {
ChecksumAlgorithm: string | null;
ETag: string;
Key: string;
LastModified: string;
Size: number;
StorageClass: string;
}
interface Result {
Contents: Content[];
ContinuationToken: string | null;
KeyCount: number;
MaxKeys: number;
Name: string;
StartAfter: string | null;
}
Using the Result
To use the result in another step, write as follows.
return outputs.stepName.Contents.map((content) => content.Key);
GetObject
Retrieves the contents of a specific object. For more information, see the AWS S3 official document.
Parameters
Name | Type | Description |
---|---|---|
Bucket (bucket) | string | The name of the bucket to retrieve the object from. |
Key (key) | string | The key of the object to retrieve. |
Query Result
interface Result {
Body: string;
}
Using the Result
To use the result in another step, write as follows.
return outputs.stepName.Body;
Generate URL
Generates an accessible URL for an object.
Parameters
Name | Type | Description |
---|---|---|
Bucket (bucket) | string | The name of the bucket to retrieve the object from. |
Key (key) | string | The key of the object to retrieve. |
Query Result
interface Result {
Url: string;
}
Using the Result
To use the result in another step, write as follows.
return outputs.stepName.Url;
PresignGetObject
Generates a signed URL for downloading an object. For more information, see the AWS S3 official document.
Query Result
interface Result {
Url: string;
}
Using the Result
To use the result in another step, write as follows.
return outputs.stepName.Url;
Parameters
Name | Type | Description |
---|---|---|
Bucket (bucket) | string | The name of the bucket to retrieve the object from. |
Key (key) | string | The key of the object to retrieve. |
Expires In (expiresIn) | number | The expiration time in seconds. |
PresignPutObject
Generates a signed URL for uploading an object. For more information, see the AWS S3 official document.
Parameters
Name | Type | Description |
---|---|---|
Bucket (bucket) | string | The name of the bucket to retrieve the object from. |
Key (key) | string | The key of the object to retrieve. |
Expires In (expiresIn) | number | The expiration time in seconds. |
Query Result
interface Result {
Url: string;
}
Using the Result
To use the result in another step, write as follows.
return outputs.stepName.Url;
PutObject
Uploads a new object to S3. For more information, see the AWS S3 official document.
Name | Type | Description |
---|---|---|
Bucket (bucket) | string | The name of the bucket to upload the object to. |
Key (key) | string | The key of the object to upload. |
Body (body) | string | The content of the object to upload. |
Acl (acl) | string | The access control list of the object. |
Content MD5 (contentMd5) | string | The MD5 hash of the object content. |
Query Result
type Result = Record<string, never>;
putObject returns an empty object.
DeleteObject
Deletes an object from S3. For more information, see the AWS S3 official document.
Parameters
Name | Type | Description |
---|---|---|
Bucket (bucket) | string | The name of the bucket to delete the object from. |
Key (key) | string | The key of the object to delete. |
Version ID (versionId) | string | The version ID of the object to delete. |
Query Result
type Result = Record<string, never>;
deleteObject returns an empty object.