AWS中使用CloudFront分发API Gateway

首先需要准备一个Lambda function(Lambda->Functions)

还要准备一个证书,要覆盖子域名(AWS Certificate Manager->Certificates)。

1、API Gateway->Create API->REST API->Build->API endpoint type( Edge-optimized )->Create API

2、Resources->Create method->Method type(GET)->Integration type(Lambda function)->

Create method

3、Resources->/->GET(/ - GET - Method execution)->Test->结果正确否

4、Resources->Deploy API->Stage(*New Stage*)->Stage name(prod)

5、Stages->prod->/->GET->Invoke URL(https://xxxxxxxx.execute-api.us-east-1.amazonaws.com/prod/),复制地址能访问否

至此,API Gateway已创建完毕

6、CloudFront->Distributions->Create distribution->Origin domain(你的API Gateway)->Origin path - optional(/prod)-> Viewer protocol policy(HTTPS only)->Web Application Firewall (WAF)(Do not enable security protections)->Price class(Use only North America and Europe)->Alternate domain name (CNAME) - optional-> Add item(abc.yourdomain.com)->Custom SSL certificate *- optional->*Create distribution

7、CloudFront->Distributions->Domain name(xxxxxx.cloudfront.net)->复制备用

8、Route 53->Hosted zones->yourdomain.com->Create record->Record name(abc)->Record type(CNAME)->Value(复制备用的xxxxxx.cloudfront.net)->Create records

9、访问abc.yourdomain.com

10、nslookup abc.yourdomain.com

相关推荐
逐流人7 小时前
Containerd容器管理实战:从架构原理到nerdctlcrictl工具链
linux·运维·云原生·容器·云计算·containerd
事界见闻20 小时前
多电平变换器实时仿真怎么选?微秒级解算与多机拓展下的技术评估与方案分析
云计算
闲云野鹤在人间1 天前
docker 入门 | 第7章 容器监控 和 第8章 容器日志 详解
运维·docker·容器·架构·云计算
云边云科技_云网融合1 天前
从一盘散棋到一张蓝图:某连锁集团的云上重构
网络·科技·云计算
小葱运维1 天前
日志规范(K8s 结构化日志)
运维·开源·云计算
Akamai中国1 天前
Akamai Valkey 托管数据库:企业 AI 的实时内存解决方案
人工智能·云计算·云服务
翼龙云_cloud1 天前
腾讯云国际云服务器代理商:WorkBuddy评测 办公智能体落地90天实践复盘
服务器·云计算·腾讯云·workbuddy
I肆逸I1 天前
Docker 容器技术
云计算
AKAMAI2 天前
Akamai Valkey 托管数据库:企业 AI 的实时内存解决方案
人工智能·云计算
QYR-分析2 天前
智能车灯升级浪潮!全球车载LED矩阵控制芯片行业研究报告
云计算·汽车