Serverless Api Cloudfront

homepage icon https://github.com/Droplr/serverless-api-cloudfront

Tracked

NPM Downloads Last Month
162
Issues
1
Stars
26
Forks
2
Watchers
26

Repo README Contents:

serverless-api-cloudfront

serverless npm version MIT licensed npm downloads

Automatically creates properly configured AWS CloudFront distribution that routes traffic to API Gateway.

Due to limitations of API Gateway Custom Domains, we realized that setting self-managed CloudFront distribution is much more powerful.

:zap: Pros

Installation

$ npm install --save-dev serverless-api-cloudfront

Configuration

# add in your serverless.yml

plugins:
  - serverless-api-cloudfront

custom:
  apiCloudFront:
    domain: my-custom-domain.com
    certificate: arn:aws:acm:us-east-1:000000000000:certificate/00000000-1111-2222-3333-444444444444
    waf: 00000000-0000-0000-0000-000000000000
    logging:
      bucket: my-bucket.s3.amazonaws.com
      prefix: my-prefix