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

相关推荐
Lifangyun_WD7 小时前
第一次租 GPU 服务器怎么开始?镜像、SSH、数据存储和停机前要做什么
服务器·云计算·gpu算力·gpu算力租赁
Huazhongzhanhui10 小时前
极智防护与绿色表改:2026中国(武汉)国际表面处理展览会涂装涂料展会前瞻
人工智能·云计算
workflower11 小时前
人形机器人灵巧手产业链
人工智能·设计模式·机器人·云计算·无人机
翼龙云_cloud12 小时前
阿里云国际渠道代理商:如何在ECS上部署Flask应用?
运维·数据库·阿里云·flask·云计算
Eric.4617 小时前
秋叶ComfyUI-AKI最新整合包|完整部署教程+核心指令手册
云计算·百度云·comfyui·ai漫剧
NJCloud18 小时前
OpenStack(四)——进阶篇之私有网络配置与块存储服务(Cinder)部署
linux·网络·云计算·openstack
2601_9620715719 小时前
SpringCloud篇(服务网关 - GateWay)
spring boot·spring cloud·gateway
小马同学-20 小时前
一、云计算
云计算
2601_9621896021 小时前
【SpringCloud】Gateway
java·spring cloud·gateway
老猿AI洞察1 天前
阿里云启用巴西数据中心,AI服务出海落子南半球
人工智能·阿里云·云计算