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

相关推荐
@insist12315 小时前
信息安全工程师-云计算安全核心知识框架
安全·云计算·软考·信息安全工程师·软件水平考试
ZStack开发者社区19 小时前
全球化2.0 | ZStack亮相印尼云计算与数据中心大会 以新一代云底座助力数字印尼建设
服务器·云计算·gpu算力
SAP上海工博云署20 小时前
汽配出海业务扩张难题拆解:SAP Business One 适配跨境制造管理
大数据·人工智能·云计算·制造·信息与通信·零售
XINVRY-FPGA1 天前
XC7Z020-2CLG484I Xilinx Zynq-7000 SoC FPGA
嵌入式硬件·fpga开发·云计算·硬件工程·fpga
智慧医养结合软件开源1 天前
数智协同,赋能康养服务高效升级
大数据·人工智能·云计算·生活
林林奇遇记1 天前
阿里云虚拟主机wordpress无法安装插件
阿里云·云计算
少年攻城狮1 天前
阿里云系列---【申请域名并绑定到主机ip】
linux·服务器·tcp/ip·阿里云·云计算
酷道1 天前
获取Docker阿里云专属镜像加速地址
阿里云·docker·容器·云计算
互联网老欣1 天前
2026 最新|OpenClaw(Clawdbot)阿里云轻量服务器一键部署保姆级教程(避坑 + 性能调优)
服务器·阿里云·云计算
Harvy_没救了1 天前
【云计算】OpenStack 核心组件知识总结(一)
云计算·openstack