I’ve got some lambda functions set up to be accessible via html, with the portion of serverless.yaml for this function as below. The event that is passed into the lambda function has the header “CloudFront-Viewer-Country”, but according to the CloudFront docs there should be a way to also get more detailed info in CloudFront-Viewer-Region, -City, -Postcode, etc. How do I enable those? Do I need to make a full CloudFront deployment rather than the invisible version of cloudfront you get automatically with the APIGateway?
functions:
****:
handler: /src/lambda/****.handler
name: ****-${self:custom.stage}
description: '****'
package:
include:
- src/lambda/****.js
memorySize: 384
timeout: 30
tags:
Name: ***
Environment: ${self:custom.stage}
environment:
DEPLOYMENT_STAGE: ${self:custom.stage}
events:
- http:
path: /****
method: post
cors: true
authorizer: aws_iam