Hello guys, do you have an example with `CloudFron...
# help
t
Hello guys, do you have an example with
CloudFront
and the
Api
construct?
Edge-optimized API endpoint
The default hostname of an API Gateway API that is deployed to the specified Region while using a CloudFront distribution to facilitate client access typically from across AWS Regions. API requests are routed to the nearest CloudFront Point of Presence (POP), which typically improves connection time for geographically diverse clients.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-basic-concept.html#apigateway-definition-edge-optimized-api-endpoint
m
are you looking to configure cloudfront to route traffic to the api?
t
yes
API Gateway is deployed to the specific region, all modification requests (POST, PUT) will go directly to API Gateway (with some secret code), all GET requests will go through CDN and will be cached for a few hours.
(I have a working solution right now)