@webiny/serverless-files

4.14.0 • Public • Published

@webiny/serverless-files

code style: prettier PRs Welcome

The infrastructure for the Webiny Files (@webiny/api-files) API.

It deploys a single API Gateway with /files/{fileKey} route for downloading files, and the /graphql route which is consumed by the Apollo's GraphQL Gateway.

Tip: Use a CDN (Cloudfront) to cache all output from the /files/{fileKey}.

Usage

Use it in your serverless.yml file like so:

name: my-app

vars:
  region: "us-east-1"
  env:
    JWT_SECRET: ${env.JWT_SECRET}
  database:
    server: ${env.MONGODB_SERVER}
    name: ${env.MONGODB_NAME}

files:
  component: "@webiny/serverless-files"
  inputs:
    region: ${vars.region}
    bucket: "webiny-files-4"
    name: files
    memory: 128
    database: ${vars.database}
    env: ${vars.env}
    
anotherService:
  ...    

Readme

Keywords

none

Package Sidebar

Install

npm i @webiny/serverless-files

Weekly Downloads

0

Version

4.14.0

License

MIT

Unpacked Size

67.6 kB

Total Files

57

Last publish

Collaborators

  • webiny