Skip to content

Commit 4546757

Browse files
authored
AWS S3 Upload Large Files (#15386)
* update uploadFile method * pnpm-lock.yaml * versions
1 parent 2c0af81 commit 4546757

File tree

14 files changed

+55
-14
lines changed

14 files changed

+55
-14
lines changed

components/aws/actions/s3-download-file-to-tmp/s3-download-file-to-tmp.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
Downloads a file from S3 to the /tmp directory.
1313
[See the documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
1414
`),
15-
version: "0.0.2",
15+
version: "0.0.3",
1616
type: "action",
1717
props: {
1818
aws: common.props.aws,

components/aws/actions/s3-generate-presigned-url/s3-generate-presigned-url.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "aws-s3-generate-presigned-url",
88
name: "S3 - Generate Presigned URL",
99
description: "Creates a presigned URL to download from a bucket. [See the documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/example_s3_Scenario_PresignedUrl_section.html)",
10-
version: "0.0.1",
10+
version: "0.0.2",
1111
type: "action",
1212
props: {
1313
aws: common.props.aws,

components/aws/actions/s3-stream-file/s3-stream-file.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
Accepts a file URL, and streams the file to the provided S3 bucket/key.
1111
[See the docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html)
1212
`),
13-
version: "0.4.3",
13+
version: "0.4.4",
1414
type: "action",
1515
props: {
1616
aws: common.props.aws,

components/aws/actions/s3-upload-file-tmp/s3-upload-file-tmp.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
Accepts a file path or folder path starting from /tmp, then uploads the contents to S3.
1313
[See the docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html)
1414
`),
15-
version: "1.0.1",
15+
version: "1.0.2",
1616
type: "action",
1717
props: {
1818
aws: common.props.aws,

components/aws/actions/s3-upload-file-url/s3-upload-file-url.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default {
1515
Accepts a download link and a filename, downloads it, then uploads to S3.
1616
[See the docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html)
1717
`),
18-
version: "0.1.2",
18+
version: "0.1.3",
1919
type: "action",
2020
props: {
2121
aws: common.props.aws,

components/aws/actions/s3-upload-file/s3-upload-file.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
Accepts a base64-encoded string and a filename, then uploads as a file to S3.
1010
[See the docs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/upload-objects.html)
1111
`),
12-
version: "0.3.1",
12+
version: "0.3.2",
1313
type: "action",
1414
props: {
1515
aws: common.props.aws,

components/aws/common/common-s3.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import {
44
CreateBucketCommand,
55
ListBucketsCommand,
66
GetObjectCommand,
7-
PutObjectCommand,
87
PutBucketPolicyCommand,
98
GetBucketNotificationConfigurationCommand,
109
PutBucketNotificationConfigurationCommand,
1110
} from "@aws-sdk/client-s3";
11+
import { Upload } from "@aws-sdk/lib-storage";
1212
import { axios } from "@pipedream/platform";
1313

1414
export default {
@@ -81,7 +81,11 @@ export default {
8181
return this._clientS3().send(new GetObjectCommand(params));
8282
},
8383
async uploadFile(params) {
84-
return this._clientS3().send(new PutObjectCommand(params));
84+
const parallelUploads3 = new Upload({
85+
client: await this._clientS3(),
86+
params,
87+
});
88+
await parallelUploads3.done();
8589
},
8690
async streamFile(fileUrl) {
8791
return axios(this, {

components/aws/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/aws",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "Pipedream Aws Components",
55
"main": "aws.app.mjs",
66
"keywords": [
@@ -25,6 +25,7 @@
2525
"@aws-sdk/client-sqs": "^3.58.0",
2626
"@aws-sdk/client-ssm": "^3.58.0",
2727
"@aws-sdk/client-sts": "^3.58.0",
28+
"@aws-sdk/lib-storage": "^3.734.0",
2829
"@aws-sdk/s3-request-presigner": "^3.609.0",
2930
"@aws-sdk/signature-v4-crt": "^3.731.0",
3031
"@pipedream/helper_functions": "^0.3.6",

components/aws/sources/new-emails-sent-to-ses-catch-all-domain/new-emails-sent-to-ses-catch-all-domain.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
These events can trigger a Pipedream workflow and can be consumed via SSE or REST API.
1717
`),
1818
type: "source",
19-
version: "1.2.3",
19+
version: "1.2.4",
2020
props: {
2121
...base.props,
2222
domain: {

components/aws/sources/s3-deleted-file/s3-deleted-file.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "aws-s3-deleted-file",
77
name: "New Deleted S3 File",
88
description: "Emit new event when a file is deleted from a S3 bucket",
9-
version: "0.1.2",
9+
version: "0.1.3",
1010
dedupe: "unique",
1111
props: {
1212
...base.props,

0 commit comments

Comments
 (0)