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

相关推荐
m0_694845574 小时前
服务器需要备案吗?在哪些地区需要备案?
linux·运维·服务器·云计算
云资源服务商10 小时前
解锁阿里云日志服务SLS:云时代的日志管理利器
服务器·阿里云·云计算
朱包林11 小时前
day45-nginx复杂跳转与https
linux·运维·服务器·网络·云计算
sealaugh3215 小时前
aws(学习笔记第四十八课) appsync-graphql-dynamodb
笔记·学习·aws
m0_694845571 天前
服务器如何配置防火墙规则开放/关闭端口?
linux·服务器·安全·云计算
moppol1 天前
Serverless 架构入门与实战:AWS Lambda、Azure Functions、Cloudflare Workers 对比
云原生·serverless·aws
观测云1 天前
观测云 × AWS SSO:权限治理可观测实践
云计算·aws
在云上(oncloudai)1 天前
AWS Directory Services全解析
aws
G皮T1 天前
【云计算】企业项目 & 策略授权
云计算·iam·公有云·企业项目·策略授权·统一身份认证
_可乐无糖1 天前
AWS WebRTC: 判断viewer端拉流是否稳定的算法
linux·服务器·webrtc·aws