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 小时前
腾讯云国际站性能调优
运维·服务器·数据库·云计算·腾讯云
国际云,接待11 小时前
微软云如何申请使用
服务器·云原生·架构·微软·云计算·量子计算
XINVRY-FPGA12 小时前
XCVP1902-2MSEVSVA6865 Xilinx FPGA Versal Premium SoC/ASIC
嵌入式硬件·安全·阿里云·ai·fpga开发·云计算·fpga
国际云,接待12 小时前
阿里云CDN和腾讯云CDN综合对比
运维·服务器·阿里云·性能优化·云计算·腾讯云
天河归来12 小时前
通过阿里云服务发送邮件
数据库·阿里云·云计算
Britz_Kevin12 小时前
从零开始的云计算生活——第十一天,知识延续,程序管理。
云计算·#linux·#程序管理
hnlucky12 小时前
k8s中kubeSphere的安装使用+阿里云私有镜像仓库配置完整步骤
linux·运维·学习·阿里云·容器·kubernetes·云计算
嵌入式学习菌12 小时前
mqtt协议连接阿里云平台
物联网·网络协议·阿里云·云计算
Britz_Kevin18 小时前
从零开始的云计算生活——第十四天,困难重重,安全管理。
计算机网络·安全·云计算·#linux·#安全管理·#防火墙
tuan_zhang18 小时前
第三章:地下三层的技术遗产
程序人生·云计算