{"id":39039425,"url":"https://github.com/anddimario/postino","last_synced_at":"2026-01-17T17:46:55.380Z","repository":{"id":52020293,"uuid":"208438534","full_name":"anddimario/postino","owner":"anddimario","description":"Get email details from a dynamodb table and send with ses, in a serverless way with aws (batch, dynamodb, lambda and ses)","archived":false,"fork":false,"pushed_at":"2021-11-16T21:58:25.000Z","size":17,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-23T12:02:33.355Z","etag":null,"topics":["aws","batch","dynamodb","email","lambda","sendemail","sendmail","serverless","ses","template"],"latest_commit_sha":null,"homepage":null,"language":"HCL","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/anddimario.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}},"created_at":"2019-09-14T12:39:29.000Z","updated_at":"2019-12-30T13:07:23.000Z","dependencies_parsed_at":"2022-08-24T11:40:35.381Z","dependency_job_id":null,"html_url":"https://github.com/anddimario/postino","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/anddimario/postino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anddimario%2Fpostino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anddimario%2Fpostino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anddimario%2Fpostino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anddimario%2Fpostino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anddimario","download_url":"https://codeload.github.com/anddimario/postino/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anddimario%2Fpostino/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28513975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: 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","batch","dynamodb","email","lambda","sendemail","sendmail","serverless","ses","template"],"created_at":"2026-01-17T17:46:55.188Z","updated_at":"2026-01-17T17:46:55.349Z","avatar_url":"https://github.com/anddimario.png","language":"HCL","readme":"Get email details from a dynamodb table and send with ses, in a serverless way with aws (batch, dynamodb, lambda and ses). Templating system is based on handlebars.\n\n### Install\n- `npm i --production`\n- create an `aws-keys.json` with your credentials, see: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB.html\n- send on aws:\n```\nexport AWS_ACCESS_KEY_ID=\"...\"\nexport AWS_SECRET_ACCESS_KEY=\"...\"\nexport AWS_DEFAULT_REGION=\"...\"\nexport AWS_REGION=\"...\"\nexport TF_VAR_aws_region=your_region\nexport TF_VAR_docker_image=your_ecr_image_path\nterraform apply\n```\n\n### How it works\n- store yout template in `templates/`\n- store on dynamodb this payload:\n```\n{\n    id: ...\n    to: [...],\n    locals: {\n       ...\n    },\n    from: ....,\n    subject: ...,\n    template: ...\n}\n```\n\n### Development and local testing\n- install https://github.com/localstack/localstack/\n- install aws cli\n- start localstack:\n```\nexport SERVICES=dynamodb,ses\ndocker-compose up\n```\n- create a dynamodb table:\n```\naws dynamodb create-table --endpoint=http://localhost:4569 --table-name postino_mails --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5\n```\n- insert a record in dynamodb:\n```\naws dynamodb put-item --endpoint=http://localhost:4569 --table-name postino_mails --item file://item.json\n```\nexample of item.json:\n```\n{\n  \"id\": {\n    \"S\": \"test\"\n  },\n  \"to\": {\n    \"L\": [\n      {\n        \"S\": \"test@example.com\"\n      }\n    ]\n  },\n  \"locals\": {\n    \"M\": {\n      \"test\": {\n        \"S\": \"ok\"\n      }\n    }\n  },\n  \"from\": {\n    \"S\": \"admin@example.com\"\n  },\n  \"subject\": {\n    \"S\": \"Test\"\n  },\n  \"template\": {\n    \"S\": \"testtemplate\"\n  }\n}\n```\n- create a template in template, example for `testtemplate.html`:\n```\nThis is to see if it's {{ test }}\n```\n- verify email on ses: \n```\naws ses verify-email-identity --email-address admin@example.com --endpoint-url=http://localhost:4579\n```\n\n#### Build on localhost\n- go in the project root\n- build the image: `docker build -t postino .`\n- run the image: \n```\ndocker run --network=\"host\" -e DYNAMO_OPTIONS='{\"endpoint\":\"http://localhost:4569\"}' -e SES_OPTIONS='{\"endpoint\":\"http://localhost:4579\"}' -e AWS_REGION='localhost' -t postino\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanddimario%2Fpostino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanddimario%2Fpostino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanddimario%2Fpostino/lists"}