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 分钟前
网关 Sentinel 限流实战:API 分组、规则加载与全量匹配踩坑记
nacos·gateway·sentinel·流控规则
阿乔外贸日记5 小时前
全球电子产业高度集中:中、韩、日和中国台湾地区占全球数字硬件产能八成
大数据·服务器·人工智能·物联网·云计算
Joy T7 小时前
从 Nginx 到 Gateway 再到微服务:一次 AI 请求的完整链路
nginx·微服务·gateway·controller·路由转发·ai service·接口错误排查
mengge.cloud7 小时前
Redis
运维·服务器·数据库·redis·缓存·云计算
Thomas.Sir9 小时前
第19课:Gateway过滤器、全局拦截、请求响应统一处理
spring cloud·gateway
酒神dnspup10 小时前
多地区网站可用性监控怎么做?DNSPup 从基线到告警的完整实战
运维·ios·云计算·iphone·dns·网络监控
闲云野鹤在人间21 小时前
MySQL|从理论、安装、备份到主从复制、MHA高可用详解
linux·运维·数据库·mysql·云计算
honsor1 天前
以太网温湿度传感器:RJ45直连机房的环境监控新方案
运维·网络·数据库·物联网·安全·云计算·github
Elastic 中国社区官方博客1 天前
AWS 自动化根因分析:从 CloudWatch 告警到完成故障诊断,仅需 36 秒
大数据·运维·elasticsearch·自动化·aws