You should be doing your CloudFront configuration in CloudFormation.
You can do CloudFormation in your
serverless.yml (under the
resources property), but I probably wouldn’t do it in the same
serverless.yml as your application - Your CloudFront distribution will rarely change, so it’s best to keep it separate (i.e. in a resource-only service).