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

相关推荐
是乐谷6 小时前
阿里云杭州 AI 产品法务岗位信息分享(2025 年 8 月)
java·人工智能·阿里云·面试·职场和发展·机器人·云计算
青岛佰优联创新科技有限公司8 小时前
移动板房的网络化建设
服务器·人工智能·云计算·智慧城市
夕阳与风馨9 小时前
三分钟搞懂云计算三大模型:SaaS、PaaS、IaaS 是怎么在业务中“各司其职”的?
后端·云计算
weixin_3077791313 小时前
AWS Lambda解压缩S3 ZIP文件流程
python·算法·云计算·aws
运维行者_1 天前
使用Applications Manager进行 Apache Solr 监控
运维·网络·数据库·网络安全·云计算·apache·solr
Britz_Kevin2 天前
从零开始的云计算生活——激流勇进,kubernetes模块之Pod资源对象
kubernetes·云计算·生活·#pod
阿湯哥3 天前
Cloud Computing(云计算)和Sky Computing(天空计算)
云计算
数据智能老司机3 天前
基于 Kubernetes 的平台工程——Kubernetes 上的平台化浪潮
kubernetes·云计算·devops
数据智能老司机3 天前
图算法趣味学——桥和割点
数据结构·算法·云计算
数据智能老司机3 天前
图算法趣味学——图遍历
数据结构·算法·云计算