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

相关推荐
Tob管理笔记25 分钟前
建筑业如何精准开拓优质客户?技术驱动下的方法论与实践
大数据·云计算·数据库开发
China_Yanhy3 小时前
AWS S3 深度配置指南:每一栏每个选项有什么作用
java·数据库·aws
咕噜企业分发小米4 小时前
独立IP服务器有哪些常见的应用场景?
人工智能·阿里云·云计算
Mr. zhihao5 小时前
使用 KMS 管理阿里云 OSS 临时凭证(AK/SK/STS):原理、对比与实战代码示例
阿里云·云计算
奇树谦5 小时前
FastDDS阿里云DDSRouter安装和使用(失败)
elasticsearch·阿里云·云计算
虎冯河5 小时前
阿里云 + 宝塔面板环境Python 项目从 0 到 1 部署全流
python·阿里云·云计算
China_Yanhy6 小时前
后端开发者的 AWS 大数据指南:从 RDS 到 Data Lake
大数据·云计算·aws
周之鸥6 小时前
宝塔面板 + 阿里云 DNS 实现 Let’s Encrypt 证书自动续签(详细图文教程)
阿里云·云计算·宝塔面板·let’s encrypt·自动续签
翼龙云_cloud16 小时前
阿里云渠道商:如何手动一键扩缩容ECS实例?
运维·服务器·阿里云·云计算
AKAMAI18 小时前
基准测试:Akamai云上的NVIDIA RTX Pro 6000 Blackwell
人工智能·云计算·测试