Serverless Api Cloudfront

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

Tracked

NPM Downloads Last Month
67
Issues
4
Stars
33
Forks
3
Watchers
33
Watch Star Fork Issue Download License NPM Build Status Coverage Status Contributors

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