{"id":27146226,"url":"https://github.com/ryands17/s3-thumbnail-generator","last_synced_at":"2025-04-08T10:09:55.319Z","repository":{"id":38278926,"uuid":"295025851","full_name":"ryands17/s3-thumbnail-generator","owner":"ryands17","description":"Generate thumbnails with S3 via SQS and Lambda created using AWS CDK","archived":false,"fork":false,"pushed_at":"2024-05-28T08:31:55.000Z","size":936,"stargazers_count":7,"open_issues_count":14,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-28T21:19:28.126Z","etag":null,"topics":["aws","cdk","lambda","s3","sqs"],"latest_commit_sha":null,"homepage":"","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/ryands17.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":"2020-09-12T21:03:36.000Z","updated_at":"2024-05-31T22:50:54.864Z","dependencies_parsed_at":"2023-02-14T19:31:35.604Z","dependency_job_id":"a8e0bafb-746c-47c0-a2ec-479558ffc4d9","html_url":"https://github.com/ryands17/s3-thumbnail-generator","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/ryands17%2Fs3-thumbnail-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryands17%2Fs3-thumbnail-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryands17%2Fs3-thumbnail-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryands17%2Fs3-thumbnail-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryands17","download_url":"https://codeload.github.com/ryands17/s3-thumbnail-generator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247819947,"owners_count":21001394,"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":["aws","cdk","lambda","s3","sqs"],"created_at":"2025-04-08T10:09:54.760Z","updated_at":"2025-04-08T10:09:55.281Z","avatar_url":"https://github.com/ryands17.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# S3 image resizer\n\n![Build Status](https://github.com/ryands17/s3-thumbnail-generator/workflows/CI/badge.svg)\n\nThis is an [aws-cdk](https://aws.amazon.com/cdk/) project where you can generate a thumbnail based on [S3 event notifications](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) using an SQS Queue with Lambda.\n\n## Steps\n\n1. Change the region in the `cdk.context.json` to the one where your want to deploy. Default is `us-east-2`.\n\n2. Run `yarn` (recommended) or `npm install`\n\n3. Go to the resources folder `cd resources`.\n\n4. Run `yarn add --arch=x64 --platform=linux sharp` or `npm install --arch=x64 --platform=linux sharp` to build `sharp` for Lambda.\n\n5. Go back to the root and run `yarn cdk deploy --profile profileName` to deploy the stack to your specified region. You can skip providing the profile name if it is `default`. You can learn about creating profiles using the aws-cli [here](https://docs.aws.amazon.com/cli/latest/reference/configure/#configure).\n\n6. Now you can add image/s in the _photos_ folder in S3 and check after a couple of seconds that images in a folder named _thumbnails_ is generated by Lambda via SQS.\n\nThe `cdk.json` file tells the CDK Toolkit how to execute your app.\n\n## Useful commands\n\n- `yarn watch` watch for changes and compile\n- `yarn test` perform the jest unit tests\n- `yarn cdk deploy` deploy this stack to your default AWS account/region\n- `yarn cdk diff` compare deployed stack with current state\n- `yarn cdk synth` emits the synthesized CloudFormation template\n\n## Todo\n\n- [ ] Add a DLQ for error processing\n- [ ] Replace `aws-lambda` with `aws-lambda-nodejs`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryands17%2Fs3-thumbnail-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryands17%2Fs3-thumbnail-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryands17%2Fs3-thumbnail-generator/lists"}