npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

serverless-spa-config

1.0.8 • Public • Published

serverless-spa-config

Serverless plugin to configure S3, CloudFront and Route53 for a SPA or JAMStack site.

  • Creates S3 Website bucket
  • Creates CloudFront distribution (unless disabled:true)
  • Creates Route 53 RecordSet (unless disabled:true or hostedZoneId:undefined or endpoint:undefined)
  • Creates S3 Website redirect bucket (when redirect:true)
    • And creates corresponding CloudFront distribution and Route 53 RecordSet

This plugin is designed to work in conjunction with the serverless-spa-deploy plugin.

serverless.yml

Optional settings are commented out and show default values

plugins:
  - serverless-spa-deploy
  - serverless-spa-config

custom:
  spa:
    files: # per serverless-spa-deploy
      ...
    # redirect: true
  dns:
    hostedZoneId: ZZZZZZZZZZZZZZ
    domainName: example.com
    endpoint: app.${self:custom.cdn.domainName}
  cdn:
    # aliases:
    #   - ${self:custom.cdn.endpoint}
    # priceClass: PriceClass_100
    # acmCertificateArn: arn:aws:acm:region:account-id:certificate/certificate-id
    # logging:
    #   bucketName: ${self:custom.cdn.logging.bucketName}.s3.amazonaws.com
    #   prefix: aws-cloudfront
    # webACLId: arn:aws:waf::account-id:resource-type/resource-id
    # disabled: true
    # enabled: stage1,stage2

install

npm i serverless-spa-config

Downloadsweekly downloads

22

version

1.0.8

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability