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

相关推荐
刘~浪地球10 小时前
架构设计--事件驱动架构设计与实现(05)
云原生·系统架构·云计算
Luke~10 小时前
阿里云计算巢已上架!3分钟部署 Loki AI 事故分析引擎,SRE 复盘时间直接砍掉 80%
人工智能·阿里云·云计算·loki·devops·aiops·sre
Database_Cool_10 小时前
基于PolarDB Mem0 为 OpenClaw 构建高效记忆系统(阿里云开发者)
阿里云·云计算
亚马逊云开发者11 小时前
都2026了,你的游戏服务器还在裸奔?聊聊用Player Gateway彻底隐藏IP的DDoS防护方案
aws
光电大美美-见合八方中国芯14 小时前
用于无色波分复用光网络的 10.7 Gb/s 反射式电吸收调制器与半导体光放大器单片集成
网络·后端·ai·云计算·wpf·信息与通信·模块测试
wb18915 小时前
NoSQL数据库Redis集群重习
数据库·redis·笔记·云计算·nosql
爱淋雨的男人16 小时前
网关gateway详解
gateway
朱建伟16 小时前
跟我一起玩转PVE
云计算
翼龙云_cloud18 小时前
亚马逊云代理商:三步用 CloudWatch 高效监控 AWS Lambda 日志
云计算·aws·云服务器
wb18919 小时前
企业级MySQL重习
数据库·笔记·mysql·adb·云计算