{"id":18347636,"url":"https://github.com/botpress/aws-s3-signed-uploads-example","last_synced_at":"2025-07-10T12:39:27.681Z","repository":{"id":102018789,"uuid":"491116254","full_name":"botpress/aws-s3-signed-uploads-example","owner":"botpress","description":"S3 Uploads with Signed URLs","archived":false,"fork":false,"pushed_at":"2024-05-06T13:12:43.000Z","size":105,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T14:47:34.493Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botpress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-11T13:09:53.000Z","updated_at":"2022-11-03T08:57:32.000Z","dependencies_parsed_at":"2024-12-23T19:12:52.315Z","dependency_job_id":"fffc6fe3-006f-44a3-9062-de45bf612e6c","html_url":"https://github.com/botpress/aws-s3-signed-uploads-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Faws-s3-signed-uploads-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Faws-s3-signed-uploads-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Faws-s3-signed-uploads-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botpress%2Faws-s3-signed-uploads-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botpress","download_url":"https://codeload.github.com/botpress/aws-s3-signed-uploads-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248127810,"owners_count":21052293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T21:14:34.018Z","updated_at":"2025-04-09T23:25:55.091Z","avatar_url":"https://github.com/botpress.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S3 Uploads with Signed URLs\n\n## What is this?\n\nThis repo contains examples of uploading files to a S3 bucket using Signed URLs\n\n## Getting started\n\n1. Install: `yarn`\n2. Deploy the CDK app contained in `src/cdk-example`. From the `src/cdk-example` directory, run `npx cdk deploy --all --profile {your AWS profile} --require-approval never --progress events` .\n\n   - Note the stack's outputs (`AccessKeyOutput`, `BucketNameOutput`, `SecretAccessKeyOutput`), they'll be useful in the following steps\n   - This stack contains a IAM User that can upload files to a S3 bucket\n\n3. Test singlepart uploads: from the repo's root, run `AWS_REGION={region where you deployed the CDK app} AWS_ACCESS_KEY_ID={value of AccessKeyOutput} AWS_SECRET_ACCESS_KEY={value of SecretAccessKeyOutput} BUCKET_NAME={value of BucketNameOutput} npx ts-node src/singlepart/index.ts path/to/a/file/to/upload.jpg`\n   - After the command completes, you'll find the uploaded file in the S3 bucket created in step 2\n4. Test multipart uploads: from the repo's root, run `AWS_REGION={region where you deployed the CDK app} AWS_ACCESS_KEY_ID={value of AccessKeyOutput} AWS_SECRET_ACCESS_KEY={value of SecretAccessKeyOutput} BUCKET_NAME={value of BucketNameOutput} npx ts-node src/multipart/index.ts path/to/a/file/to/upload.jpg`\n   - After the command completes, you'll find the uploaded file in the S3 bucket created in step 2\n\n## About uploads in S3\n\nTo upload data in a S3 bucket, 2 methods exist:\n\n1. Single PUT object request (I call this \"singlepart upload\")\n2. Multipart upload\n\n### Comparing singlepart and multipart uploads\n\n#### Singlepart uploads\n\n- Works with files \u003c= 5GB in size\n- Simpler to implement (only 1 request to S3)\n- If the request is interrupted, it has to be started all over\n\n#### Multipart uploads\n\n- Works with files \u003c= 5TB in size\n- More complex to implement (multiple requests to S3)\n- Improved throughput – You can upload parts in parallel to improve throughput\n- Quick recovery from any network issues – Smaller part size minimizes the impact of restarting a failed upload due to a network error.\n- Pause and resume object uploads – You can upload object parts over time. After you initiate a multipart upload, there is no expiry; you must explicitly complete or stop the multipart upload.\n- Begin an upload before you know the final object size – You can upload an object as you are creating it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotpress%2Faws-s3-signed-uploads-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotpress%2Faws-s3-signed-uploads-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotpress%2Faws-s3-signed-uploads-example/lists"}