You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lambda-s3-download/README.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ The function is configured with a 15-minute timeout, 1 GB memory, and 10 GB ephe
54
54
55
55
## Testing
56
56
57
-
Invoke the Lambda function with a test event:
57
+
Retrieve the Lambda function's name from the SAM deployment output and invoke it with a test event:
58
58
59
59
```bash
60
60
aws lambda invoke \
@@ -75,6 +75,22 @@ Optional event parameters:
75
75
|`target_bucket_region`| S3 bucket region | Lambda's region |
76
76
|`chunk_size_mb`| Size of each download chunk in MB (clamped between 5 and 5120) | 512 |
77
77
78
+
Example with all optional parameters:
79
+
80
+
```bash
81
+
aws lambda invoke \
82
+
--function-name FUNCTION_NAME \
83
+
--cli-binary-format raw-in-base64-out \
84
+
--payload '{
85
+
"download_url": "https://example.com/file.zip",
86
+
"download_filename": "file.zip",
87
+
"target_bucket": "my-other-bucket",
88
+
"target_bucket_region": "eu-central-1",
89
+
"chunk_size_mb": 256
90
+
}' \
91
+
response.json
92
+
```
93
+
78
94
## Known Limitations
79
95
80
96
- The Lambda function has a 15-minute maximum timeout. If the download and upload combined take longer than that, the function will be killed mid-stream and the multipart upload will be left incomplete. Consider setting an [S3 lifecycle rule](https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpu-abort-incomplete-mpu-lifecycle-config.html) on the target bucket to auto-clean incomplete multipart uploads.
0 commit comments