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

相关推荐
The star"'3 小时前
mysql(1-3)
运维·mysql·云计算
九河云7 小时前
AI重构竞争格局:企业级应用的爆发与价值分化
ai作画·云计算·aigc·ai编程·ai写作
@YDWLCloud10 小时前
出海 APP 如何降低延迟?腾讯云国际版 GME 音视频深度评测
大数据·服务器·云计算·音视频·腾讯云
九河云10 小时前
华为云 ModelArts 赋能 AI 开发:从模型训练到边缘部署的全流程优化实践
服务器·人工智能·华为云·云计算
TG:@yunlaoda360 云老大11 小时前
如何选择适合自己业务的腾讯云国际站代理商VPC架构?
架构·云计算·腾讯云
Akamai中国12 小时前
无服务器计算架构的优势
人工智能·云计算·云服务
周杰伦_Jay12 小时前
【Open-AutoGLM】手机端智能助理框架详解
智能手机·架构·开源·云计算
Yng Forever14 小时前
腾讯云人脸识别SDK集成
java·后端·云计算·腾讯云