CloudFormation 模板一次创建 S3、API Gateway、Lambda、SNS 及所需 IAM 角色
serverless-landing-page — HTML 企业官网模板
作者 justabuzz
一个 AWS CloudFormation 模板,用于快速搭建带联系表单的无服务器落地页,包含 S3 静态托管、API Gateway、Lambda 与 SNS 邮件通知。
看看你的网站会是什么样
浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。
目前有 1 张原始预览,可打开完整图片查看设计细节。
截图用于了解视觉与布局,交互效果请以实际项目为准。
值得关注的模板亮点
从已有项目资料中,快速了解它的特点。
S3 存储桶用于托管静态落地页内容
API Gateway 接收联系表单提交并转发给 Lambda
Lambda 通过 SNS 把表单数据发送到指定邮箱
仓库自带 index.html 与 error.html 两个初始页面
模板详细介绍
该项目面向需要反复制作落地页与联系表单的场景,把服务器预置工作交给 AWS 无服务器资源。仓库提供一份 CloudFormation 模板,部署后会创建用于存放静态内容的 S3 存储桶、接收表单提交的 API Gateway、处理提交的 Lambda,以及通过 SNS 把表单数据发送到指定邮箱的主题,并附带所需的 IAM 角色。仓库同时包含落地页的初始 HTML:index.html 提供基础落地页与联系表单,并带有提交到 API Gateway 的代码;error.html 用于用户访问错误 URL 时显示。
使用前需要确认部署所在的 AWS 区域支持 Lambda 与 API Gateway。部署流程为:运行 CloudFormation 模板并填写堆栈名称、用于 S3 托管的托管区域名(或子域名)以及接收表单数据的邮箱;从 API Gateway 控制台的 prod 阶段获取端点 URL,替换 index.html 中的占位地址;把 index.html 与 error.html 上传到 S3 存储桶并设为公开;最后确认 SNS 发送的订阅确认邮件。站点 URL 可在 CloudFormation 的 Outputs 标签页找到。
自定义表单需要同时修改两处:在 index.html 中增加字段并更新 JavaScript,并在 API Gateway 的 POST 方法中,于 Method Integration 的 Body Mapping Templates 下添加对应字段。README 还提到可自行通过 Route53 配置自定义域名,或为落地页配置 CloudFront 作为 CDN,后者未包含在模板中,以避免给部分用户带来额外费用。
适合你的项目吗?
适用场景
- 为需要联系表单的推广落地页快速搭建无服务器后端
- 在 AWS 上托管纯静态落地页并接收表单提交邮件
- 作为 CloudFormation 与无服务器架构组合的参考示例
- 需要按项目反复创建类似落地页时复用模板
适合人群
- 熟悉 AWS 控制台与 CloudFormation 的开发者
- 需要静态落地页加邮件表单通知的团队
- 希望避免为落地页预置服务器的项目
上手与定制指南
结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。
- 1
确认部署区域支持 AWS Lambda 与 AWS API Gateway
- 2
运行 CloudFormation 模板时需提供堆栈名称、托管区域名和接收表单的邮箱
- 3
从 API Gateway 控制台 prod 阶段获取端点 URL,替换 index.html 中的占位地址
- 4
把 index.html 与 error.html 上传到 S3 存储桶并设为公开
- 5
部署后需确认 SNS 发送的订阅确认邮件,否则收不到表单数据
授权与来源资料
使用条件与限制
免费使用 · 保留许可声明本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。
使用时需要遵守
- 允许免费使用、修改、商用和分发该版本代码。
- 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
- 代码按现状提供;担保与责任限制以原许可证及适用法律为准。
额外费用与待核对事项
- 部署区域必须支持 AWS Lambda 与 AWS API Gateway,否则无法使用该模板。
- 使用前必须拥有 AWS 账户并运行 CloudFormation 模板来创建 S3、API Gateway、Lambda、SNS 等资源,会产生相应 AWS 费用。
- 部署后需手动从 API Gateway 控制台获取 prod 阶段端点 URL,并替换 index.html 中的占位地址。
- 需手动将 index.html 与 error.html 上传到 S3 存储桶并设为公开,否则页面无法访问。
- 必须确认 SNS 发送的订阅确认邮件,否则表单数据无法送达指定邮箱。
- CloudFront CDN 未包含在模板中,需自行配置且可能产生额外 AWS 费用。
- 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
- 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据
Permission is hereby granted, free of charge
许可证原文
Make sure the AWS region you deploy this on supports the following AWS resources:
README 原文
Run the CloudFormation template to provision all necessary AWS resources.
README 原文
Grab the API Gateway 'prod' endpoint URL
README 原文
Upload to the S3 bucket the two files index.html and error.html and make them public
README 原文
Remember to confirm the receiving of emails from the site - a confirmation email is sent as part of the creation of the site
README 原文
https://github.com/justabuzz/serverless-landing-page/blob/master/LICENSEhttps://github.com/justabuzz/serverless-landing-page/blob/master/README.mdYou may also configure AWS CloudFront to CDN your landing page. I didn't include that as part of the CloudFormation as it may incur unecessary costs to some users.
README 原文
DeepSeek 根据仓库许可证和 README 整理 ·2026-10-03。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。
项目核对记录与介绍依据
模板资料
- 来源平台
- GitHub
- 资料与维护参考分
- 资料一般 · 60 / 100
- 技术栈
- HTML
- 网站类型
- 企业官网
这个分数如何计算
本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。
这个项目需要核对什么
- 记录的仓库更新时间
- 2016-07-10
- 截图检查日期
- 2026-10-03
目前没有记录演示链接。请依据仓库说明在本地评估;仅凭截图无法确认交互行为。
目录记录的主要技术栈是 HTML。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。
查看具体选型方法 →介绍的制作与核对状态
介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。
已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。
查看当时使用的来源资料
SHA-256: db62844994f60d341ed0a59172201e3b079aca9f180e27c082ed602d93e9b829
2026-10-03T00:07:56.007Z
来源文件 / 仓库# Serverless Landing Page
An AWS CloudFormation template for creating a serverless landing page website.
Author: [@justabuzz] | http://www.onclouds.com.au/
## Overview
Create a landing page in a snap! How many times did you have to create a landing page with a Contact Us form? It's one of those tasks that tend to repeat themselves. And how can you guage what sort of server to provision for this page? If your client plans promoting it at some point then you need to ensure you provision the right server for the time job.
Enter Serverless Landing Page! By utilising serverless infrastructure you avoid the provisioning part and focus solely on your business problem. And by using this AWS CloudFormation template you also avoid the initial setup of your serverless landing page. Leaving yourself with the most important task - design the actual landing page. That's it! The rest is ready! :)
## Features
The CloudFormation template provisions the following AWS resources:
* S3 Bucket to store static content
* AWS API Gateway to receive submitted Contact Us form data and pass it to AWS Lambda
* AWS Lambda to publish the submitted data via AWS SNS
* AWS SNS to send the form data to the designated email address
* Various AMI roles for the necessary permissions the resources require
The repository includes an initial version for the landing page HTML, which includes:
* index.html: a basic landing page with a Contact form and all the code to submit it to the API Gateway
* error.html: an error page if users accidentally reach the wrong URL on the site
## Infrastructure design

## Requirements
Make sure the AWS region you deploy this on supports the following AWS resources:
* AWS Lambda
* AWS API Gateway
You can check that in the [AWS Region Table].
## How To Setup
* Run the CloudFormation template to provision all necessary AWS resources. In the process the system will ask you for:
* Stack Name
* Hosted Zone - domain (or sub-domain) for the landing page - this is important in order to enable S3-based hosting
* Email Receipient - recipient of the submitted form data
* Grab the API Gateway 'prod' endpoint URL - you can do this by accessing the prod stage in API Gateway console
* Replace the URL place holder in index.html with the endpoint URL
* Upload to the S3 bucket the two files index.html and error.html and make them public
* Remember to confirm the receiving of emails from the site - a confirmation email is sent as part of the creation of the site
You will find your new serverless landing page site URL under the CloudFormation template's Outputs tab.
That's it! You have a fully functional serverless landing page!
## What To Do Next
You probably want to customise the site's URL. Here's how you can do that using [Route53]. Remember that you have to use the HostedZone value you have entered.
You may also configure AWS CloudFront to CDN your landing page. I didn't include that as part of the CloudFormation as it may incur unecessary costs to some users. Here's how to [configure CloudFront with S3].
## FAQ
### How to customise the Contact Us form?
Customising the form requires an update in two places:
* Add the required fields and update the JS in index.html.
* Update API Gateway's POST method - add the new fields under Method Integration (under Body Mapping Templates)
That's it! Enjoy!
[@justabuzz]: <https://github.com/justabuzz/>
[AWS Region Table]: <https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/>
[Route53]: <http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-configure-route53.html>
[configure CloudFront with S3]: <http://docs.aws.amazon.com/gettingstarted/latest/swh/getting-started-create-cfdist.html>
看看同类模板
对比同技术栈与用途的模板,找到更适合的视觉与内容结构。

mazer
Free and Open-source Bootstrap 5 Admin Dashboard Template and Landing Page
HTML · 后台

Freelancer
Freelancer 是 Start Bootstrap 出品的单页作品集模板,专为自由职业者、设计师和小型工作室设计。 页面结构清晰,包含多个内容区块、响应式作品集网格,每个作品项目配有模态窗口展示详情。
HTML · 作品集

Creative
Creative 是 Start Bootstrap 团队维护的一款单页营销模板,定位明确:为创意机构或产品服务提供一个以作品展示和行动号召为核心的落地页。
HTML · 企业官网

startbootstrap-agency
Agency 是 Start Bootstrap 维护的单页代理商作品集主题,基于 Bootstrap 构建,MIT 许可。
HTML · 企业官网

startbootstrap-landing-page
这是 Start Bootstrap 系列中一款通用型落地页模板,基于 Bootstrap 构建,定位是给产品或服务做单页推广。
HTML · 企业官网

Landing-Page
Tailwind CSS Starter Template - Landing Page
HTML · 企业官网
