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

相关推荐
TG_yunshuguoji1 小时前
阿里云国际代理商:有哪些文件适合阿里云CDN分发?
阿里云·云计算
哲霖软件5 小时前
什么是机械设备制造ERP?哲霖软件如何助力企业实现降本增效?
云计算
Devin_Zhang8 小时前
AWS EKS部署Prometheus和Grafana
监控·aws
光影少年10 小时前
云计算生态及学习方向和就业领域方向
学习·云计算
Akamai中国17 小时前
Linebreak赋能实时化企业转型:专业系统集成商携手Akamai以实时智能革新企业运营
人工智能·云计算·云服务
2401_8653825020 小时前
工信部发布→《云计算综合标准化体系建设指南(2025版)》
网络安全·云计算·信息安全技术
云宏信息1 天前
【深度解析】VMware替代的关键一环:云宏ROW快照如何实现高频业务下的“无感”数据保护?
服务器·网络·数据库·架构·云计算·快照
wanhengidc1 天前
如何使用云手机进行游戏挂机?
运维·服务器·游戏·智能手机·云计算
王道长服务器 | 亚马逊云1 天前
AWS CloudTrail:让每一次操作都“有迹可循”
服务器·网络·云计算·智能路由器·aws
不知道累,只知道类1 天前
Java 在AWS上使用SDK凭证获取顺序
java·aws