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

相关推荐
冰菓Neko4 小时前
《云计算》第三版总结
云计算
家庭云计算专家4 小时前
onlyoffice 源码调试指南-ARM和x86双模式安装支持
arm开发·docker·容器·云计算
大G哥5 小时前
云计算-私有云-私有云服务运维
运维·云计算
金斗潼关10 小时前
SpringCloud GateWay网关
java·spring cloud·gateway
TUTO_TUTO16 小时前
【AWS+Wordpress】将本地 WordPress 网站部署到AWS
笔记·学习·云计算·aws
AWS官方合作商16 小时前
AWS VPC架构师指南:从零设计企业级云网络隔离方案
安全·架构·aws
国际云,接待16 小时前
云计算的基础概论
服务器·人工智能·阿里云·云原生·云计算·腾讯云·aws
我不是帅戈17 小时前
STM32+安信可Ai-WB2-12F连接阿里云物联网平台
stm32·物联网·阿里云·云计算·安信可
程序员小杰@20 小时前
✨WordToCard使用分享✨
前端·人工智能·开源·云计算
残花月伴20 小时前
springCloud/Alibaba常用中间件之GateWay网关
spring cloud·中间件·gateway