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

相关推荐
sbjdhjd2 小时前
网工进阶笔记:H3CSE 园区网全栈技术与协议汇总
网络·笔记·云计算·ssh·网络工程·vlan·aaa
长不大的杨瑞杰4 小时前
OpenCode v2 会话可靠性实战:Snapshots、Compaction、Instructions 与 Formatters
人工智能·安全·云计算·软件工程·devops
做运维的阿瑞8 小时前
云项目可观测性与成本治理:告警、日志、Dashboard 与预算标签
大数据·云原生·云计算·terraform
yyuuuzz9 小时前
云服务器安全组规则优先级的机制记录
运维·服务器·网络·安全·阿里云·aws
知已难寻10 小时前
01 · OpenStack的认证管理 Keystone
运维·服务器·云原生·云计算·openstack
做运维的阿瑞13 小时前
EKS 可销毁环境:集群创建、应用部署到账单归零
云原生·云计算·terraform
云-缩影15 小时前
我用阿里云 AI 动画方案跑通了剧本→视频流水线:ComfyUI + 百炼模型实测
人工智能·阿里云·云计算
Raas10016 小时前
MAI Gateway实战部署:AI网关怎么部署?从0到1上手指南
人工智能·gateway·ai网关·企业级ai网关·企业级产品·ai技术交流
你看我名字18 小时前
云计算工程师技能树:从 Linux 基础到云平台架构能力
linux·架构·云计算
yunlaodacom1 天前
腾讯云国际站服务代理商:CVM连接TencentDB失败排查指南
云计算·php·腾讯云