🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

serverless-spa-apig

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-spa-apig

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

1.0.4
latest
Source
npm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

serverless-spa-apig

Serverless plugin to configure S3, API Gateway and Route53 for a SPA.

This approach is useful when CloudFront is not permitted. It sets up API Gateway as a proxy to S3.

  • Creates S3 bucket
  • Creates API Gateway (unless apig:false)
  • Creates Custom DomainName and BasePathMapping (when domainName is provided)
  • Creates Route 53 RecordSet (when hostedZoneId is provided)

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

serverless.yml

Optional settings are commented out

plugins:
  - serverless-spa-deploy
  - serverless-spa-apig

custom:
  # partition: aws-us-gov
  spa:
    websiteBucketNameOutputRef: SpaBucketName
    acl: private
    files: # per serverless-spa-deploy
      ...
  apig: # false
    hostedZoneId: ZZZZZZZZZZZZZZZZZZZZ
    domainName: example.com
    acmCertificateArn: arn:aws:acm:us-east-1:0123456789:certificate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    # webACLId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    # vpcEndpointId: xxxxxx
    # policy:

Keywords

serverless

FAQs

Package last updated on 24 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts