{"id":13528383,"url":"https://github.com/TylerShin/lambda-image-manager","last_synced_at":"2025-04-01T11:31:29.180Z","repository":{"id":99079986,"uuid":"90732628","full_name":"TylerShin/lambda-image-manager","owner":"TylerShin","description":null,"archived":false,"fork":false,"pushed_at":"2017-06-15T00:54:32.000Z","size":135,"stargazers_count":15,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T22:52:53.800Z","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/TylerShin.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}},"created_at":"2017-05-09T10:19:22.000Z","updated_at":"2021-12-10T07:56:43.000Z","dependencies_parsed_at":"2024-01-13T22:23:19.235Z","dependency_job_id":null,"html_url":"https://github.com/TylerShin/lambda-image-manager","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/TylerShin%2Flambda-image-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerShin%2Flambda-image-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerShin%2Flambda-image-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TylerShin%2Flambda-image-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TylerShin","download_url":"https://codeload.github.com/TylerShin/lambda-image-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246631961,"owners_count":20808791,"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-08-01T06:02:29.420Z","updated_at":"2025-04-01T11:31:28.813Z","avatar_url":"https://github.com/TylerShin.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Lambda Image Manager\n\nLambda Image Manager is AWS Lambda function that store, get, manipulate images in AWS S3.\n\nIf you are using Cloudinary or Imgix like service just for resizing or basic image manipulation, maybe you don't need them anymore.\n\n## Before Start\n\nIf you aren't used to [Serverless](https://serverless.com/) or AWS Lambda, I highly recommend that read Serverless docs first.\n\nRemember! AWS provides free tier amount, but this whole service is not **FREE**.\n\n### Todo List\n* Add DynamoDB logic.\n\n### Prerequisites\n\n- Make empty AWS S3 bucket for image file store.\n~~- Make and set AWS DynamoDB for cache.~~(Not supported yet)\n\n### Installing\n\n```\ngit clone https://github.com/TylorShin/lambda-image-manager.git\ncd lambda-image-manager\nnpm install\n```\n\nAnd set production environment.\n(If you want to stage or other)\n\n```\n# /env/prod.yml\nS3_BUCKET_NAME: lambdaImage\nS3_DEST_PREFIX: images/original\n```\n\nThe S3 folder structure should be like below.\n```\n# lambdaImage Bucket\n\n/root\n  /images\n    /original\n```\n\nThen if you ready to deploy Serverless project,\njust run\n\n```\nnpm run deploy:prod\n```\n\n**IMPORTANT**\n\n![Set API Gateway](https://m7ix47c297.execute-api.us-east-1.amazonaws.com/prod/getImage?id=2017-06-11T03:22:10.250Z\u0026filename=a11ebe37-312f-4178-b43a-517fe801340e)\n(this image is actually from my own service by using this repository)\n\n\nYou should set lambda-image-manager's API Gateway's binary support option.\n\nAt API Gateway setting page, set binary option allow header to \"image/*\".\nThen, **Deploy** API Gateway once again in console dashboard.\n\n## Running the tests\n\nWIP\n\n\n## How It Works\n#### getImage\n* A browser try to presentation \u003cimg /\u003e tag with src property heading our API gateway that trigger lambda function.\n* Lambda get request with image id, image file name, image manipulation options.\n* Trying to find pre-manipulated result from AWS DynamoDB as cache. If the target image is already manipulated with same option, then read that image's address from DynamoDB and return redirect response to that address.\n* If there is no cache, manipulate target image with given options.\n* Change the image to Buffer with BASE64 encode.\n* After that, store the result to S3 and record result address to DynamoDB with manipulation options.\n* return manipulated target image to user.\n\n## Built With\n\n* [Serverless](https://serverless.com/) - The web framework used\n\n## Contributing\n\nWIP\n\n## Authors\n\n* **Tylor Shin** - *Project Manager* - [TylorShin](https://github.com/TylorShin)\n* **breath103** - *Tech lead \u0026 Initial idea maker* - [breath103](https://github.com/breath103)\n\n## License\n\nWIP\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTylerShin%2Flambda-image-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTylerShin%2Flambda-image-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTylerShin%2Flambda-image-manager/lists"}