{"id":15649491,"url":"https://github.com/alehatsman/clj-lambda-graphviz-s3","last_synced_at":"2026-04-27T23:35:17.924Z","repository":{"id":73440999,"uuid":"101190001","full_name":"alehatsman/clj-lambda-graphviz-s3","owner":"alehatsman","description":"Example of using graphviz in s3 using clojure","archived":false,"fork":false,"pushed_at":"2017-09-07T20:17:08.000Z","size":2109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-30T00:12:38.500Z","etag":null,"topics":["aws-lambda","aws-s3","clojure","graphql"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alehatsman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2017-08-23T14:31:34.000Z","updated_at":"2019-12-04T14:48:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"39abf8fc-ee79-46a1-937f-bf7eff39b270","html_url":"https://github.com/alehatsman/clj-lambda-graphviz-s3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alehatsman/clj-lambda-graphviz-s3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-lambda-graphviz-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-lambda-graphviz-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-lambda-graphviz-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-lambda-graphviz-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alehatsman","download_url":"https://codeload.github.com/alehatsman/clj-lambda-graphviz-s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alehatsman%2Fclj-lambda-graphviz-s3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32360113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-lambda","aws-s3","clojure","graphql"],"created_at":"2024-10-03T12:29:55.291Z","updated_at":"2026-04-27T23:35:17.909Z","avatar_url":"https://github.com/alehatsman.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clj-lambda-graphviz-s3\n\nIn this project, my goal is to create an aws lambda function, which performs dot graph rendering in the cloud.\n\nI use Clojure for function implementation. That function takes graph description, generates graph using c binary library \"Graphviz\" and saves graph to S3 storage.\n\nI used my lambada library for AWS Lambda integration, clojure.java.shell to call graphviz executable.\n\nMy plan was:\n\n1. Buuild Graphviz executable binary, that i can run in AWS Lambda environment.\n2. Place binary under resources, so it will be packed into uberjar.\n3. During runtime, copy binary under /tmp folder in AWS Lambda.\n4. Run graph generation to temp file.\n5. Put file to s3 and remove temp file.\n\n## How to build Graphviz with pdf support.\n\nWe use graphviz library. We have to compile graphviz in the same platform, that we going to use to run it. (AWS Lambda) I have rent EC2 instance and compiled library in it.\n\n```\n$ // Rent ec2 instance.\n$ // Connect to it using ssh.\n$ yum groupinstall \"Development tools\" // that will install C compiler and delepment tools.\n$ sudo yum install cairo-devel pango-devel // that dependencies required for PDF format.\n$ wget http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.40.1.tar.gz\n$ tar -xvf graphviz-2.40.1.tar.gz\n$ cd graphviz-2.40.1\n$ ./configure \n$ make \n$ cd cmd/dot\n$ make dot_static\n// To copy file from ssh to your local machine use next command\n$ scp ec2-user@\u003cplace-your-number\u003e.eu-central-1.compute.amazonaws.com:/home/ec2-user/graphviz/graphviz-2.40.1/cmd/dot/dot_static ./\n```\n\n## Execute graphviz using clojure.shell\n\nThe problem i faced is how to install graphviz in AWS Lambda environment. Because you do not have access to machine itself. What i decided to is to generate graphviz binary, place it under resources, and then copy under /tmp folder. From there we can call it as binary executable.\n\nTo execure graphviz binary i use [clojure.java.shell](https://clojure.github.io/clojure/clojure.java.shell-api.html). For that purpose i generate sh script and feed it to sh function.\n\n## License\n\nCopyright © 2017 Aleh Atsman\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falehatsman%2Fclj-lambda-graphviz-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falehatsman%2Fclj-lambda-graphviz-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falehatsman%2Fclj-lambda-graphviz-s3/lists"}