{"id":15002317,"url":"https://github.com/wearetechnative/terraform-aws-html-form-action","last_synced_at":"2026-02-14T06:30:56.083Z","repository":{"id":231279490,"uuid":"706742284","full_name":"wearetechnative/terraform-aws-html-form-action","owner":"wearetechnative","description":"Simple self-hosted form handler with Lambda and API Gateway. Great for static websites.","archived":false,"fork":false,"pushed_at":"2025-12-03T15:19:29.000Z","size":208,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-06T20:02:10.877Z","etag":null,"topics":["api-gateway","aws","html-form","jamstack","lambda","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/wearetechnative/html-form-action/aws/latest","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wearetechnative.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-18T14:29:07.000Z","updated_at":"2025-12-03T15:19:33.000Z","dependencies_parsed_at":"2024-05-07T09:27:09.349Z","dependency_job_id":"21e4bab1-c686-438b-9f0c-c240197ac466","html_url":"https://github.com/wearetechnative/terraform-aws-html-form-action","commit_stats":null,"previous_names":["wearetechnative/terraform-aws-html-form-action"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wearetechnative/terraform-aws-html-form-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-html-form-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-html-form-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-html-form-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-html-form-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wearetechnative","download_url":"https://codeload.github.com/wearetechnative/terraform-aws-html-form-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wearetechnative%2Fterraform-aws-html-form-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29438756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T05:24:35.651Z","status":"ssl_error","status_checked_at":"2026-02-14T05:24:34.830Z","response_time":53,"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":["api-gateway","aws","html-form","jamstack","lambda","terraform","terraform-module"],"created_at":"2024-09-24T18:49:33.167Z","updated_at":"2026-02-14T06:30:56.066Z","avatar_url":"https://github.com/wearetechnative.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TAHFA (Terraform AWS HTML Form Action)\n\nTAHFA implements a simple form handler for plain html forms. Great for static\nwebsites. Sets up Lambda and API Gateway.\n\n[![](we-are-technative.png)](https://www.technative.nl)\n\n## Features\n\n- Creates Lambda mailform POST endpoint\n- Optional Success URL redirect\n- Optional Failure URL redirect\n- Optional [ALTCHA](https://altcha.org) Spam Protection\n- Optional Mail reply template\n\n## How does it work\n\nThe TAHFA module creates an API Gateway POST resource and connects this to a\nlambda function. When a HTML form is submitted the API Gateway forwards the\nformdata to the lambda function and this sends the email.\n\n## Altcha Implementation\n\n![](altcha.png)\n\nSince version 0.2 TAHFA features [ALTCHA](https://altcha.org) challege and validation funcions.\nALTCHA is a free, open-source CAPTCHA alternative. ALTCHA uses a proof-of-work\nmechanism to protect your website, APIs, and online services from spam and\nunwanted content. ALTCHA is free, open-source, does not use cookies nor\nfingerprinting, does not track users, and is fully compliant with GDPR.\n\n## Requirements\n\n- A configured SES domain or SES emails available in the same account.\n\n## Example\n\nCheckout the [examples](./examples) for complete implementations. The inline example below\nshows a simple usa case.\n\n### terraform\n\n```hcl\nmodule \"form_action_example_com\" {\n  source         = \"TechNative-B-V/html-form-action/aws\"\n\n  name           = \"example-com-form-action-handler\"\n  to_email       = \"webinbox@example.com\"\n  from_email     = \"no-reply@example.com\"\n}\n\noutput \"form_action_example_com_url_for_form\" {\n  description = \"Place this URL in your the action attribute of your form element.\"\n  value = module.form_action_example_com.message_post_url\n}\n```\n\n### Simple html form\n\nThe form html looks like this.\n\n```html\n\u003cform action=\"https://XXXXXXXXXX.execute-api.eu-central-1.amazonaws.com/formpost/message\" method=\"post\"\u003e\n\n  \u003c!-- FORM CONFIGURATION --\u003e\n  \u003cinput type=\"hidden\" name=\"_subject\" value=\"Demo Form Submission\"\u003e\n  \u003cinput type=\"hidden\" name=\"_success_url\" value=\"http://example.com/form_success.html\"\u003e\n\n  \u003c!-- FORM FIELDS --\u003e\n  \u003cinput placeholder=\"Full Name\" type=\"text\" name=\"full-name\"\u003e\u003cbr\u003e\n  \u003cinput placeholder=\"Email\" type=\"text\" name=\"Email\"\u003e\u003cbr\u003e\n  \u003ctextarea name=\"message\" placeholder=\"Your message\"\u003e\u003c/textarea\u003e\u003cbr\u003e\n\n  \u003cinput type=\"submit\" value=\"send\"\u003e\u003c/br\u003e\n\n\u003c/form\u003e\n```\n\n\u003c!-- BEGIN_TF_DOCS --\u003e\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e= 4.0.0 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_lambda_function_altchachallenge\"\u003e\u003c/a\u003e [lambda\\_function\\_altchachallenge](#module\\_lambda\\_function\\_altchachallenge) | terraform-aws-modules/lambda/aws | 3.3.1 |\n| \u003ca name=\"module_lambda_function_formpost\"\u003e\u003c/a\u003e [lambda\\_function\\_formpost](#module\\_lambda\\_function\\_formpost) | terraform-aws-modules/lambda/aws | 3.3.1 |\n| \u003ca name=\"module_resource_cors_altchachallenge\"\u003e\u003c/a\u003e [resource\\_cors\\_altchachallenge](#module\\_resource\\_cors\\_altchachallenge) | mewa/apigateway-cors/aws | 2.0.0 |\n| \u003ca name=\"module_resource_cors_formpost\"\u003e\u003c/a\u003e [resource\\_cors\\_formpost](#module\\_resource\\_cors\\_formpost) | mewa/apigateway-cors/aws | 2.0.0 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_api_gateway_deployment.altcha_challenge](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_deployment) | resource |\n| [aws_api_gateway_deployment.formpost](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_deployment) | resource |\n| [aws_api_gateway_integration.message_altchachallenge](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_integration) | resource |\n| [aws_api_gateway_integration.message_formpost](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_integration) | resource |\n| [aws_api_gateway_method.message_altchachallenge](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_method) | resource |\n| [aws_api_gateway_method.message_formpost](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_method) | resource |\n| [aws_api_gateway_resource.message_altchachallenge](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_resource) | resource |\n| [aws_api_gateway_resource.message_formpost](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_resource) | resource |\n| [aws_api_gateway_rest_api.altcha_challenge](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_rest_api) | resource |\n| [aws_api_gateway_rest_api.formpost](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/api_gateway_rest_api) | resource |\n| [aws_lambda_permission.lambda_permission](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |\n| [aws_lambda_permission.lambda_permission_formpost](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_allowed_origin\"\u003e\u003c/a\u003e [allowed\\_origin](#input\\_allowed\\_origin) | Which origin to allow submissions from. Use * when testing | `string` | `\"*\"` | no |\n| \u003ca name=\"input_altcha_hmac_key\"\u003e\u003c/a\u003e [altcha\\_hmac\\_key](#input\\_altcha\\_hmac\\_key) | HMAC Key to sign and validate Altcha Challenge | `string` | `\"change.me.now\"` | no |\n| \u003ca name=\"input_from_email\"\u003e\u003c/a\u003e [from\\_email](#input\\_from\\_email) | Receiving email address for forwarded messages, can also be configured in html form | `string` | `\"\"` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | Name to use for function and api gateway | `string` | n/a | yes |\n| \u003ca name=\"input_to_email\"\u003e\u003c/a\u003e [to\\_email](#input\\_to\\_email) | 'From' email to use when forwarding a message, defaults to recipient email in the Lambda, can also be configured in html form | `string` | `\"\"` | no |\n| \u003ca name=\"input_use_altcha\"\u003e\u003c/a\u003e [use\\_altcha](#input\\_use\\_altcha) | Enable Altcha Spam protection | `bool` | n/a | yes |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_message_altcha_challenge_url\"\u003e\u003c/a\u003e [message\\_altcha\\_challenge\\_url](#output\\_message\\_altcha\\_challenge\\_url) | GET URL for Altcha Challenge requests |\n| \u003ca name=\"output_message_post_url\"\u003e\u003c/a\u003e [message\\_post\\_url](#output\\_message\\_post\\_url) | POST URL for message requests |\n\u003c!-- END_TF_DOCS --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-aws-html-form-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwearetechnative%2Fterraform-aws-html-form-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwearetechnative%2Fterraform-aws-html-form-action/lists"}