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

相关推荐
小白考证进阶中5 小时前
阿里云认证重要通知(Clouder+ACX职业岗位)
阿里云·云计算·阿里云acp报名·阿里云acp备考·阿里云aca证书·阿里云aca大模型·阿里云aca报名
spider_xcxc7 小时前
告别单点故障:阿里云CLB负载均衡从入门到实战
阿里云·云计算·负载均衡
hz5678910 小时前
电子远程评标系统哪家好?安全、合规、易用平台评测指南
安全·云计算·音视频·实时音视频·信息与通信
翼龙云_cloud12 小时前
腾讯云代理商: 腾讯云qGPU怎么破解算力浪费难题?
云计算·腾讯云·qgpu
阿乔外贸日记17 小时前
意大利进口主力产品及主要合作供应国
大数据·人工智能·物联网·搜索引擎·云计算
云服务器代理商17 小时前
AWS Bedrock 指南:模型接入、Knowledge Base RAG、Agents 与计费方式
云计算·aws·亚马逊云服务器·aws bedrock·aws代理·亚马逊云代理商
spider_xcxc18 小时前
阿里云NAS配置完全指南:从概念到实战
阿里云·云计算
我登哥MVP19 小时前
Hadoop成长史-从Nutch子项目到大数据生态王者
java·大数据·hadoop·分布式·云原生·云计算
我登哥MVP21 小时前
HDFS硬核拆解-读写Pipeline与Java实战
java·hadoop·hdfs·云原生·云计算
Database_Cool_1 天前
HTAP数据库详解_阿里云PolarDB-X一体化行列存实现实时分析
分布式·阿里云·云计算