{"_id":"@animus-bi/fs-sls","_rev":"9-4e95d593dbb2cf178e3e02c6c2742681","name":"@animus-bi/fs-sls","dist-tags":{"beta":"0.8.1-beta.8","latest":"0.9.1-beta.2","minor":"0.9.0"},"versions":{"0.8.1-beta.2":{"name":"@animus-bi/fs-sls","version":"0.8.1-beta.2","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit"},"gitHead":"52e224ca4cc362438b147ac37fcac589d59b9afb","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.8.1-beta.2","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-99aD67bw34XQv4m4iVbzEjFRgnbJ2bOt8j88t0pIid1PGQaFctkcQ5d9Yc/qczgVhLJvC5c5CuAjLu9Sfik5kw==","shasum":"32800da6c1f781f1c2f50b6336cf9bd397a15150","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.8.1-beta.2.tgz","fileCount":11,"unpackedSize":69454,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGqZbvI0RmnvNT7oea9Sa4QYeZoY+oGqPMnhQLOSiadvAiEA4XO1i6gObic7qV4WZ+tAKIad8i3ft108uFuoXHgC7OY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUe/kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZcg/+JIPr+u5gKFi+6x5JDJBSAWW04F88uQHhnnWZjQ4lzfu044zK\r\nAarfqm900H8UNW3aVr/kaf3Lj65ShorMJBGWkn9gc26qnRUWZV7WXOyRSrF+\r\nU0bQPpKedSd4g03DY7ZvN8PwSQakgd29mxl21b8FyMkhV/zS6zoNZCDN5TtV\r\nxYKP5T+bSqYEo4ynmfhROIhbN8+e9fl5K4JJWdP3TrNDo8txWXyjlfcCStLx\r\nHaQtiXmM6pBbQi4C7qk5gY66Eb4UVMUAShV8c+/dbIYthdqyCkT/moZw/Myv\r\nso6lVO3tA28vlL8z/TkCavtXZ11Udu9y2pjV/wMpO48Agrup3ge3P903AQ1x\r\nVIcnh3pr32O3FMk28ZFcrcfLKDv/XbgC4PmIJqZmjUQRKIIsploilRseQXmP\r\nBIyisLJPNr10xwcmJ5k17CXf/y53UvJrObf31zLz5Rq00Td2wshAly6hydrM\r\n2HOV2fkfawGxCYunEwbxBv7xLZnBgvrRXRQjwmBv7p8mPOt6H9lK2I/4ZgX1\r\n0j1gCrcB6E7UtbVVS7lsllJkeoQalfFc59xhjKCmTvi3wJwkq5FWqLJXkM+b\r\nvx7AX/xjDBBMsqR9UR33R6b9kaRGuJFdzi+YIM4NCuVqdwx+dy/QhNkJ/A0Q\r\nWcQj0AXxoF/9YF+vJFRSJV/AX3Lg+owqbdw=\r\n=yhLe\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.8.1-beta.2_1649536996483_0.5824425812710257"},"_hasShrinkwrap":false},"0.8.1-beta.4":{"name":"@animus-bi/fs-sls","version":"0.8.1-beta.4","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit"},"readme":"# fullstack-serverless\n\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n[![npm version](https://badge.fury.io/js/fullstack-serverless.svg)](https://badge.fury.io/js/fullstack-serverless)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/MadSkills-io/fullstack-serverless/master/LICENSE)\n[![npm downloads](https://img.shields.io/npm/dt/fullstack-serverless.svg?style=flat)](https://www.npmjs.com/package/fullstack-serverless)\n\nA [serverless](http://www.serverless.com) plugin that automatically creates an AWS CloudFront distribution that serves static web content from S3 and optionally routes API traffic to API Gateway.  \n\nHome page - https://www.madskills.io/fullstack-serverless/\n\n**:zap: Pros**\n\n- Allows you to set-up custom domain for a S3 hosted site and API Gateway\n- Free SSL using AWS CertificateManager\n- No CORS needed\n- Enables CDN caching of resources - so you don't waste Lambda invocations or API Gateway traffic\n  for serving static files (just [set Cache-Control headers](https://serverless.com/framework/docs/providers/aws/events/apigateway/#custom-response-headers) in API responses)\n- More CloudWatch statistics of API usage (like bandwidth metrics)\n- Real world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n- [Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n- Can be used to manage S3 content and CloudFront without API Gateway by simply not defining any functions\n\n## Before you begin\n* Install the serverless framework\n```bash\nnpm install -g serverless\n```\n* [Setup an AWS account and configure access](https://serverless.com/framework/docs/providers/aws/guide/credentials/)\n\n## Getting started\n**First**, Install and configure\n\n#### Installation\n\n```bash\nnpm install --save-dev fullstack-serverless\n```\n\n#### Configuration\n\n* All fullstack-serverless configuration parameters are optional - e.g. don't provide ACM Certificate ARN\n  to use default CloudFront certificate (which works only for default cloudfront.net domain).\n* This plugin **does not** set-up automatically Route53 for newly created CloudFront distribution.\n  After creating CloudFront distribution, manually add Route53 ALIAS record pointing to your\n  CloudFront domain name.\n* First deployment may be quite long (e.g. 10 min) as Serverless is waiting for\n  CloudFormation to deploy CloudFront distribution.\n\n\n```yaml\n# add to your serverless.yml\n\nplugins:\n  - fullstack-serverless\n\ncustom:\n  fullstack:\n    domain: my-custom-domain.com\n    certificate: arn:aws:acm:us-east-1:...     # The ARN for the SSL cert to use form AWS CertificateManager\n    bucketName: webapp-deploy                  # Unique name for the S3 bucket to host the client assets\n    omitBucketPrefix: false                    # If 'true', will not prefix bucketName with `${self:service}-${self:provider.stage}-`\n    distributionFolder: client/dist            # Path to the client assets to be uploaded to S3\n    indexDocument: index.html                  # The index document to use\n    errorDocument: error.html                  # The error document to use\n    singlePageApp: false                       # If true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    invalidationPaths:                         # Custom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n      - /index.html\n      - /error.html\n    compressWebContent: true                   # Use compression when serving web content\n    apiPath: api                               # The path prefix for your API Gateway lambdas. The path for the lambda http event trigger needs to start with this too eg. api/myMethod\n    originPath: /${self:provider.stage}         # The origin path attached to the CloudFront <-> API Gateway reverse proxy\n    apiGatewayRestApiId: a12bc34df5            # If \"Api Gateway Rest Api\" is not part of the same serverless template, you can set your API id here \n    clientCommand: gulp dist                   # Command to generate the client assets. Defaults to doing nothing\n    clientSrcPath: client                      # The path to where you want to run the clientCommand\n    waf: 00000000-0000-0000-0000-000000000000  # ID of the Web Application Firewall. Defaults to not used\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    minimumProtocolVersion: TLSv1.2_2018\n    priceClass: PriceClass_100\n    noConfirm: false                           # Alternative to --no-confirm flag. Use this parameter if you do not want a confirmation prompt to interrupt automated builds.\n```\n\n\n**Second**, Create a website folder in the root directory of your Serverless project. This is where your distribution-ready website should live. By default the plugin expects the files to live in a folder called `client/dist`. But this is configurable with the `distributionFolder` option (see the [Configuration Parameters](#configuration-parameters) below).\n\nThe plugin uploads the entire `distributionFolder` to S3 and configures the bucket to host the website and make it publicly available, also setting other options based the [Configuration Parameters](#configuration-parameters) specified in `serverless.yml`.\n\nTo test the plugin initially you can copy/run the following commands in the root directory of your Serverless project to get a quick sample website for deployment:\n\n```bash\nmkdir -p client/dist\ntouch client/dist/index.html\ntouch client/dist/error.html\necho \"Go Serverless\" >> client/dist/index.html\necho \"error page\" >> client/dist/error.html\n```\n\n**Third**, run the plugin (this can take several minutes the first time), and visit your new website!\n\n```bash\nserverless deploy [--no-delete-contents] [--no-generate-client]\n```\n\nThe plugin should output the location of your newly deployed static site to the console.\n\n**Note:** *See [Command-line Parameters](#command-line-parameters) for details on command above*\n\n**WARNING:** The plugin will overwrite any data you have in the bucket name you set above if it already exists.\n\nTo just generate and deploy your client code:\n\n```bash\nserverless client deploy [--no-delete-contents] [--no-generate-client]\n```\n\nIf later on you want to take down the website you can use:\n\n```bash\nserverless client remove\n```\n\n### Configuration Parameters\n\n**bucketName**\n\n_required_\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    bucketName: [unique-s3-bucketname]\n    ...\n```\n\nUse this parameter to specify a unique name for the S3 bucket that your files will be uploaded to.\n\n---\n\n**omitBucketPrefix**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    omitBucketPrefix: false\n    ...\n```\n\nSet this parameter to `true` to create an S3 bucket that precisely matches `bucketName` without the {service}-{stage} prefix\n\n---\n\n**distributionFolder**\n\n_optional_, default: `client/dist`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    distributionFolder: [path/to/files]\n    ...\n```\n\nUse this parameter to specify the path that contains your website files to be uploaded. This path is relative to the path that your `serverless.yaml` configuration files resides in.\n\n---\n\n**apiPath**\n\n_optional_, default: `api`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    apiPath: api\n    ...\n```\n\nUse this parameter to specify the path prefix your API Gateway methods will be available through on your CloudFront distribution (custom domain)\n\n* If `http` events are defined, `apiPath` must be included in the path for the lambdas you want exposed through CloudFront (your custom domain). Not all your methods need to be exposed through CloudFront. For some things, esp. those that are not public facing (eg. third party web hooks) you may want to use the ApiGateway URL and not expose them through CloudFront to control access and cost.\n\n```yaml\nfunctions:\n  message:\n    handler: message.handler\n    timeout: 30\n    events:\n      - http:\n        path: ${self:custom.fullstack.apiPath}/message\n        method: post\n        integration: lambda\n```\n---\n\n**originPath**\n\n_optional_, default: `/${self:provider.stage}`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    originPath: /customOriginPath\n    ...\n```\n\nUse this parameter to specify the origin path that CloudFront will use to reverse proxy requests to API Gateway.\n\n---\n\n**apiGatewayRestApiId**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    apiGatewayRestApiId: a12bc34df5\n    ...\n```\n\nThis is only needed if \"Api Gateway Rest Api\" is not part of the same serverless template and the API id is not defined in [provider -> apiGateway](https://serverless.com/framework/docs/providers/aws/events/apigateway/#share-api-gateway-and-api-resources) section.\nThe id can be found in API Gateway url. For example, if your Rest API url is `https://a12bc34df5.execute-api.eu-central-1.amazonaws.com`, API id will be `a12bc34df5`. \n\n---\n\n**certificate**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    certificate: arn:aws:acm:us-east-1:...\n    ...\n```\n\nUse this parameter to specify ARN for the SSL cert to use form AWS CertificateManager\n\n---\n\n**indexDocument**\n\n_optional_, default: `index.html`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    indexDocument: [file-name.ext]\n    ...\n```\n\nThe name of your index document inside your `distributionFolder`. This is the file that will be served to a client visiting the base URL for your website.\n\n---\n\n**domain**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    domain: my-custom-domain.com\n    ...\n```\n\n`domain` can be a list, if you want to add more domains:\n```yaml\ncustom:\n  fullstack:\n    ...\n    domain:\n    - my-custom-domain.com\n    - secondary-custom-domain.com\n    ...\n```\n\nThe custom domain for your fullstack serverless app.\n\n---\n\n**errorDocument**\n\n_optional_, default: `error.html`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    errorDocument: [file-name.ext]\n    ...\n```\n\nThe name of your error document inside your `distributionFolder`. This is the file that will be served to a client if their initial request returns an error (e.g. 404). For an SPA, you may want to set this to the same document specified in `indexDocument` so that all requests are redirected to your index document and routing can be handled on the client side by your SPA.\n\n---\n\n**objectHeaders** \n\n_optional_, no default\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    objectHeaders:\n      ALL_OBJECTS:\n        - name: header-name\n          value: header-value\n        ...\n      specific-directory/:\n        - name: header-name\n          value: header-value\n        ...\n      specific-file.ext:\n        - name: header-name\n          value: header-value\n        ...\n      ... # more file- or folder-specific rules\n    ...\n```\n\nUse the `objectHeaders` option to set HTTP response headers be sent to clients requesting uploaded files from your website. \n\nHeaders may be specified globally for all files in the bucket by adding a `name`, `value` pair to the `ALL_OBJECTS` property of the `objectHeaders` option. They may also be specified for specific folders or files within your site by specifying properties with names like `specific-directory/` (trailing slash required to indicate folder) or `specific-file.ext`, where the folder and/or file paths are relative to `distributionFolder`. \n\nHeaders with more specificity will take precedence over more general ones. For instance, if 'Cache-Control' was set to 'max-age=100' in `ALL_OBJECTS` and to 'max-age=500' in `my/folder/`, the files in `my/folder/` would get a header of 'Cache-Control: max-age=500'.\n\n---\n\n**singlePageApp**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    singlePageApp: true\n    ...\n```\n\nIf true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    \n---\n\n**invalidationPaths**\n\n_optional_, default: `['/*']`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    invalidationPaths:\n      - /index.html\n      - /error.html\n    ...\n```\n\nCustom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n    \n---\n\n**compressWebContent**\n\n_optional_, default: `true`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    compressWebContent: true\n    ...\n```\n\nInstruct CloudFront to use compression when serving web content, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the Amazon CloudFront Developer Guide.\n    \n---\n\n**clientCommand**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    clientCommand: [command to generate your client (e.g. gulp dist)]\n    ...\n```\n\nCommand to generate the client assets. Defaults to doing nothing\n       \n---\n\n**clientSrcPath**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    clientSrcPath: [path/to/your/client]\n    ...\n```\n\nThe path to where you want to run the `clientCommand`    \n       \n---\n\n**waf**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    waf: [web application firewall ARN]\n    ...\n```\n\n[Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n         \n---\n\n**logging**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    ...\n```\n\nReal world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n         \n---\n\n**priceClass**\n\n_optional_, default: `PriceClass_All`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    priceClass: PriceClass_100\n    ...\n```\n\nCloudFront [PriceClass](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - can be PriceClass_All (default), PriceClass_100 or PriceClass_200\n\n---\n\n**minimumProtocolVersion**\n\n_optional_, default: `TLSv1`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    minimumProtocolVersion: TLSv1.2_2018\n    ...\n```\n\nSet minimum SSL/TLS [protocol version](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-MinimumProtocolVersion) - `TLSv1_2016`, `TLSv1.1_2016`, `TLSv1.2_2018` or `SSLv3`\n\n- The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers\n- The cipher that CloudFront uses to encrypt the content that it returns to viewers\n\n---\n\n**noConfirm**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    noConfirm: true\n    ...\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds. If either this or `--no-confirm` CLI parameter is true the confirmation prompt will be disabled. \n\n---\n\n**origins**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    origins:\n      - Id: Media\n        DomainName: \n          Fn::GetAtt:\n            - MediaBucket\n            - DomainName\n        S3OriginConfig:\n          OriginAccessIdentity:\n            Fn::Join:\n              - ''\n              - - origin-access-identity/cloudfront/\n                - { Ref: S3OriginAccessIdentity }\n    ...\n```\n\nUse this parameter if you want to add additional origins to the CloudFormation resources.\n\n---\n\n**defaultCacheBehavior**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    defaultCacheBehavior:\n      MinTTL: 3600\n    ...\n```\n\n---\n\n**cacheBehaviors**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    cacheBehaviors:\n      - TargetOriginId: Media\n        PathPattern: media/*\n        AllowedMethods:\n          - GET\n          - HEAD\n          - OPTIONS\n        CachedMethods:\n          - HEAD\n          - GET\n        ForwardedValues:\n          QueryString: true\n          Headers:\n            - Accept\n            - Referer\n            - Authorization\n            - Content-Type\n        ViewerProtocolPolicy: redirect-to-https\n        ...\n    ...\n```\n\nUse this parameter if you want to add additional cache behaviors to the CloudFormation resources.\n\n---\n\n### Command-line Parameters\n\n\n**--no-delete-contents**\n\n_optional_, default `false` (deletes contents by default)\n\n```bash\nserverless client deploy --no-delete-contents\n```\n\nUse this parameter if you do not want to delete the contents of your bucket before deployment. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-generate-client**\n\n_optional_, default `false` (generates client code by default if `clientCommand` and `clientSrcPath` are configured)\n\n```bash\nserverless client deploy --no-generate-client\n```\n\nUse this parameter if you do not want to generate the client code before deploying. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-client-deploy**\n\n_optional_, default `false` (deploys the generated client code by default)\n\n```bash\nserverless deploy --no-client-deploy\n```\n\nUse this parameter if you do not want to deploy the client along with the rest of the serverless stack. Almost certainly in this case you don't want to generate the client code either and will want to use \n```bash\nserverless deploy --no-generate-client --no-client-deploy\n```\n\n---\n\n**--no-confirm**\n\n_optional_, default `false` (disables confirmation prompt)\n\n```bash\nserverless client deploy --no-confirm\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds.\n\n---\n\n**--no-invalidate-distribution**\n\n_optional_, default `false` (disables creating an invalidation for the CloudFront distribution)\n\n```bash\nserverless client deploy --no-invalidate-distribution\n```\n\nUse this parameter if you do not want to invalidate the CloudFront distribution. Invalidations are  for the path `/*`.\n\n---\n\n## Maintainers\n- Andy Hahn - [andrewphahn](https://github.com/andrewphahn) from [_MadSkills.io_](http://madskills.io)\n\n## Contributors\n- [jlaramie](https://github.com/jlaramie)\n- [superandrew213](https://github.com/superandrew213)\n- [harmon25](https://github.com/harmon25)\n- [jmortlock](https://github.com/jmortlock)\n- [haochang](https://github.com/haochang)\n- [hakimio](https://github.com/hakimio)\n- [artoliukkonen](https://github.com/artoliukkonen)\n- [pecirep](https://github.com/pecirep)\n- [miguel-a-calles-mba](https://github.com/miguel-a-calles-mba)\n\n## Credits\nForked from the [**serverless-api-cloudfront**](https://github.com/Droplr/serverless-api-cloudfront/)  \nBorrowed heavily from the [**serverless-finch**](https://github.com/fernando-mc/serverless-finch/)  \nInitial CloudFormation template from [**Full Stack Serverless Web Apps with AWS**](https://medium.com/99xtechnology/full-stack-serverless-web-apps-with-aws-189d87da024a/)  \nInspiration from [**serverless-stack.com**](https://serverless-stack.com/)\n","readmeFilename":"README.md","gitHead":"4d516d5b444da0ec16e40c53b8a2c9cbe0a34219","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.8.1-beta.4","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-LfS4UaGt3ayOG5VRZgXw0vDFAS8wSFLIRqkPHeCcVROMxouXdmpJp7dMTnOJVsNUstu95dUeXj0H08Wz9qAG1A==","shasum":"14e2b5545671ac47ff80eabd096938fbfe4967b3","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.8.1-beta.4.tgz","fileCount":11,"unpackedSize":69453,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvibkU7HoeY5so0D1O50mpaU3xnTlbpXTLBv67qaLGugIgUfsEiTvzFwPQtjGkDURNq+j97VzJzKBSWtINkNle0p8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUfF5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpyAQ//VcCsmz4gL8PGJtTGX/A7747MPiMGw6XAsKYfkGQpJLgOJ7fH\r\nsA0IorB0HYnwbBHHBIAyq+jF0e1YFpvkh7irxLt+A2cdP8EZkY4XljkiPoo4\r\nkysPgB6lUWiKf2bcZAnQHZKRSqQ/Ao2VXduk/SPsgodXDw94jPT5yZsqYoXN\r\nLGfkqxoL8Tvx8PuyLR83qcVF939fzBKf6p9iEsPlknJJfCVlGrOlM0JZgbmF\r\nQqtZeE9xFECzpD1CpQqGu81MtVYM0A9bGKeULQlORqLWAgRIcoVAUwQ0ZOjn\r\nIwdQeO9hq7r5F4fj/rLl0N/cU4s8ulwYdGjGcJlLumXOsNY0covoV1GwJWQX\r\nNr1TCd2caiDVNwlemMBjMmc7ulB9jY4ulkp39EEsaMODqznlELuG/GZwWmsO\r\nM8DvPWubSRO1Qm86gyq87O3EAHgIzXVViDSYQ5XfODqQ/0/7GFdylQmWeksU\r\nu5ZPtRDFEGUonpHLh76ixafiyEFfKd8JDNABWXPQTrkAbMsi7xhjZZxuLfu2\r\nCRA/RkHdT3TEt0jTksgHTZfS3aCWefva57T8JjCF6J09Qe/Pph8dMx1GzX9o\r\nVmOs45ZGkkAuvLvn+ro0YxMs2oKOD1AnF5g9h5PioVK9pj7WH2xTido4syfX\r\n4DRJxMT4m9el/9Cmke6cA/g8Q8LYKqAP2Ek=\r\n=CS27\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.8.1-beta.4_1649537401398_0.9091833803783922"},"_hasShrinkwrap":false},"0.8.1-beta.6":{"name":"@animus-bi/fs-sls","version":"0.8.1-beta.6","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit"},"readme":"# fullstack-serverless\n\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n[![npm version](https://badge.fury.io/js/fullstack-serverless.svg)](https://badge.fury.io/js/fullstack-serverless)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/MadSkills-io/fullstack-serverless/master/LICENSE)\n[![npm downloads](https://img.shields.io/npm/dt/fullstack-serverless.svg?style=flat)](https://www.npmjs.com/package/fullstack-serverless)\n\nA [serverless](http://www.serverless.com) plugin that automatically creates an AWS CloudFront distribution that serves static web content from S3 and optionally routes API traffic to API Gateway.  \n\nHome page - https://www.madskills.io/fullstack-serverless/\n\n**:zap: Pros**\n\n- Allows you to set-up custom domain for a S3 hosted site and API Gateway\n- Free SSL using AWS CertificateManager\n- No CORS needed\n- Enables CDN caching of resources - so you don't waste Lambda invocations or API Gateway traffic\n  for serving static files (just [set Cache-Control headers](https://serverless.com/framework/docs/providers/aws/events/apigateway/#custom-response-headers) in API responses)\n- More CloudWatch statistics of API usage (like bandwidth metrics)\n- Real world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n- [Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n- Can be used to manage S3 content and CloudFront without API Gateway by simply not defining any functions\n\n## Before you begin\n* Install the serverless framework\n```bash\nnpm install -g serverless\n```\n* [Setup an AWS account and configure access](https://serverless.com/framework/docs/providers/aws/guide/credentials/)\n\n## Getting started\n**First**, Install and configure\n\n#### Installation\n\n```bash\nnpm install --save-dev fullstack-serverless\n```\n\n#### Configuration\n\n* All fullstack-serverless configuration parameters are optional - e.g. don't provide ACM Certificate ARN\n  to use default CloudFront certificate (which works only for default cloudfront.net domain).\n* This plugin **does not** set-up automatically Route53 for newly created CloudFront distribution.\n  After creating CloudFront distribution, manually add Route53 ALIAS record pointing to your\n  CloudFront domain name.\n* First deployment may be quite long (e.g. 10 min) as Serverless is waiting for\n  CloudFormation to deploy CloudFront distribution.\n\n\n```yaml\n# add to your serverless.yml\n\nplugins:\n  - fullstack-serverless\n\ncustom:\n  fullstack:\n    domain: my-custom-domain.com\n    certificate: arn:aws:acm:us-east-1:...     # The ARN for the SSL cert to use form AWS CertificateManager\n    bucketName: webapp-deploy                  # Unique name for the S3 bucket to host the client assets\n    omitBucketPrefix: false                    # If 'true', will not prefix bucketName with `${self:service}-${self:provider.stage}-`\n    distributionFolder: client/dist            # Path to the client assets to be uploaded to S3\n    indexDocument: index.html                  # The index document to use\n    errorDocument: error.html                  # The error document to use\n    singlePageApp: false                       # If true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    invalidationPaths:                         # Custom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n      - /index.html\n      - /error.html\n    compressWebContent: true                   # Use compression when serving web content\n    apiPath: api                               # The path prefix for your API Gateway lambdas. The path for the lambda http event trigger needs to start with this too eg. api/myMethod\n    originPath: /${self:provider.stage}         # The origin path attached to the CloudFront <-> API Gateway reverse proxy\n    apiGatewayRestApiId: a12bc34df5            # If \"Api Gateway Rest Api\" is not part of the same serverless template, you can set your API id here \n    clientCommand: gulp dist                   # Command to generate the client assets. Defaults to doing nothing\n    clientSrcPath: client                      # The path to where you want to run the clientCommand\n    waf: 00000000-0000-0000-0000-000000000000  # ID of the Web Application Firewall. Defaults to not used\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    minimumProtocolVersion: TLSv1.2_2018\n    priceClass: PriceClass_100\n    noConfirm: false                           # Alternative to --no-confirm flag. Use this parameter if you do not want a confirmation prompt to interrupt automated builds.\n```\n\n\n**Second**, Create a website folder in the root directory of your Serverless project. This is where your distribution-ready website should live. By default the plugin expects the files to live in a folder called `client/dist`. But this is configurable with the `distributionFolder` option (see the [Configuration Parameters](#configuration-parameters) below).\n\nThe plugin uploads the entire `distributionFolder` to S3 and configures the bucket to host the website and make it publicly available, also setting other options based the [Configuration Parameters](#configuration-parameters) specified in `serverless.yml`.\n\nTo test the plugin initially you can copy/run the following commands in the root directory of your Serverless project to get a quick sample website for deployment:\n\n```bash\nmkdir -p client/dist\ntouch client/dist/index.html\ntouch client/dist/error.html\necho \"Go Serverless\" >> client/dist/index.html\necho \"error page\" >> client/dist/error.html\n```\n\n**Third**, run the plugin (this can take several minutes the first time), and visit your new website!\n\n```bash\nserverless deploy [--no-delete-contents] [--no-generate-client]\n```\n\nThe plugin should output the location of your newly deployed static site to the console.\n\n**Note:** *See [Command-line Parameters](#command-line-parameters) for details on command above*\n\n**WARNING:** The plugin will overwrite any data you have in the bucket name you set above if it already exists.\n\nTo just generate and deploy your client code:\n\n```bash\nserverless client deploy [--no-delete-contents] [--no-generate-client]\n```\n\nIf later on you want to take down the website you can use:\n\n```bash\nserverless client remove\n```\n\n### Configuration Parameters\n\n**bucketName**\n\n_required_\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    bucketName: [unique-s3-bucketname]\n    ...\n```\n\nUse this parameter to specify a unique name for the S3 bucket that your files will be uploaded to.\n\n---\n\n**omitBucketPrefix**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    omitBucketPrefix: false\n    ...\n```\n\nSet this parameter to `true` to create an S3 bucket that precisely matches `bucketName` without the {service}-{stage} prefix\n\n---\n\n**distributionFolder**\n\n_optional_, default: `client/dist`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    distributionFolder: [path/to/files]\n    ...\n```\n\nUse this parameter to specify the path that contains your website files to be uploaded. This path is relative to the path that your `serverless.yaml` configuration files resides in.\n\n---\n\n**apiPath**\n\n_optional_, default: `api`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    apiPath: api\n    ...\n```\n\nUse this parameter to specify the path prefix your API Gateway methods will be available through on your CloudFront distribution (custom domain)\n\n* If `http` events are defined, `apiPath` must be included in the path for the lambdas you want exposed through CloudFront (your custom domain). Not all your methods need to be exposed through CloudFront. For some things, esp. those that are not public facing (eg. third party web hooks) you may want to use the ApiGateway URL and not expose them through CloudFront to control access and cost.\n\n```yaml\nfunctions:\n  message:\n    handler: message.handler\n    timeout: 30\n    events:\n      - http:\n        path: ${self:custom.fullstack.apiPath}/message\n        method: post\n        integration: lambda\n```\n---\n\n**originPath**\n\n_optional_, default: `/${self:provider.stage}`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    originPath: /customOriginPath\n    ...\n```\n\nUse this parameter to specify the origin path that CloudFront will use to reverse proxy requests to API Gateway.\n\n---\n\n**apiGatewayRestApiId**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    apiGatewayRestApiId: a12bc34df5\n    ...\n```\n\nThis is only needed if \"Api Gateway Rest Api\" is not part of the same serverless template and the API id is not defined in [provider -> apiGateway](https://serverless.com/framework/docs/providers/aws/events/apigateway/#share-api-gateway-and-api-resources) section.\nThe id can be found in API Gateway url. For example, if your Rest API url is `https://a12bc34df5.execute-api.eu-central-1.amazonaws.com`, API id will be `a12bc34df5`. \n\n---\n\n**certificate**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    certificate: arn:aws:acm:us-east-1:...\n    ...\n```\n\nUse this parameter to specify ARN for the SSL cert to use form AWS CertificateManager\n\n---\n\n**indexDocument**\n\n_optional_, default: `index.html`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    indexDocument: [file-name.ext]\n    ...\n```\n\nThe name of your index document inside your `distributionFolder`. This is the file that will be served to a client visiting the base URL for your website.\n\n---\n\n**domain**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    domain: my-custom-domain.com\n    ...\n```\n\n`domain` can be a list, if you want to add more domains:\n```yaml\ncustom:\n  fullstack:\n    ...\n    domain:\n    - my-custom-domain.com\n    - secondary-custom-domain.com\n    ...\n```\n\nThe custom domain for your fullstack serverless app.\n\n---\n\n**errorDocument**\n\n_optional_, default: `error.html`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    errorDocument: [file-name.ext]\n    ...\n```\n\nThe name of your error document inside your `distributionFolder`. This is the file that will be served to a client if their initial request returns an error (e.g. 404). For an SPA, you may want to set this to the same document specified in `indexDocument` so that all requests are redirected to your index document and routing can be handled on the client side by your SPA.\n\n---\n\n**objectHeaders** \n\n_optional_, no default\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    objectHeaders:\n      ALL_OBJECTS:\n        - name: header-name\n          value: header-value\n        ...\n      specific-directory/:\n        - name: header-name\n          value: header-value\n        ...\n      specific-file.ext:\n        - name: header-name\n          value: header-value\n        ...\n      ... # more file- or folder-specific rules\n    ...\n```\n\nUse the `objectHeaders` option to set HTTP response headers be sent to clients requesting uploaded files from your website. \n\nHeaders may be specified globally for all files in the bucket by adding a `name`, `value` pair to the `ALL_OBJECTS` property of the `objectHeaders` option. They may also be specified for specific folders or files within your site by specifying properties with names like `specific-directory/` (trailing slash required to indicate folder) or `specific-file.ext`, where the folder and/or file paths are relative to `distributionFolder`. \n\nHeaders with more specificity will take precedence over more general ones. For instance, if 'Cache-Control' was set to 'max-age=100' in `ALL_OBJECTS` and to 'max-age=500' in `my/folder/`, the files in `my/folder/` would get a header of 'Cache-Control: max-age=500'.\n\n---\n\n**singlePageApp**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    singlePageApp: true\n    ...\n```\n\nIf true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    \n---\n\n**invalidationPaths**\n\n_optional_, default: `['/*']`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    invalidationPaths:\n      - /index.html\n      - /error.html\n    ...\n```\n\nCustom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n    \n---\n\n**compressWebContent**\n\n_optional_, default: `true`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    compressWebContent: true\n    ...\n```\n\nInstruct CloudFront to use compression when serving web content, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the Amazon CloudFront Developer Guide.\n    \n---\n\n**clientCommand**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    clientCommand: [command to generate your client (e.g. gulp dist)]\n    ...\n```\n\nCommand to generate the client assets. Defaults to doing nothing\n       \n---\n\n**clientSrcPath**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    clientSrcPath: [path/to/your/client]\n    ...\n```\n\nThe path to where you want to run the `clientCommand`    \n       \n---\n\n**waf**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    waf: [web application firewall ARN]\n    ...\n```\n\n[Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n         \n---\n\n**logging**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    ...\n```\n\nReal world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n         \n---\n\n**priceClass**\n\n_optional_, default: `PriceClass_All`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    priceClass: PriceClass_100\n    ...\n```\n\nCloudFront [PriceClass](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - can be PriceClass_All (default), PriceClass_100 or PriceClass_200\n\n---\n\n**minimumProtocolVersion**\n\n_optional_, default: `TLSv1`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    minimumProtocolVersion: TLSv1.2_2018\n    ...\n```\n\nSet minimum SSL/TLS [protocol version](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-MinimumProtocolVersion) - `TLSv1_2016`, `TLSv1.1_2016`, `TLSv1.2_2018` or `SSLv3`\n\n- The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers\n- The cipher that CloudFront uses to encrypt the content that it returns to viewers\n\n---\n\n**noConfirm**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    noConfirm: true\n    ...\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds. If either this or `--no-confirm` CLI parameter is true the confirmation prompt will be disabled. \n\n---\n\n**origins**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    origins:\n      - Id: Media\n        DomainName: \n          Fn::GetAtt:\n            - MediaBucket\n            - DomainName\n        S3OriginConfig:\n          OriginAccessIdentity:\n            Fn::Join:\n              - ''\n              - - origin-access-identity/cloudfront/\n                - { Ref: S3OriginAccessIdentity }\n    ...\n```\n\nUse this parameter if you want to add additional origins to the CloudFormation resources.\n\n---\n\n**defaultCacheBehavior**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    defaultCacheBehavior:\n      MinTTL: 3600\n    ...\n```\n\n---\n\n**cacheBehaviors**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fullstack:\n    ...\n    cacheBehaviors:\n      - TargetOriginId: Media\n        PathPattern: media/*\n        AllowedMethods:\n          - GET\n          - HEAD\n          - OPTIONS\n        CachedMethods:\n          - HEAD\n          - GET\n        ForwardedValues:\n          QueryString: true\n          Headers:\n            - Accept\n            - Referer\n            - Authorization\n            - Content-Type\n        ViewerProtocolPolicy: redirect-to-https\n        ...\n    ...\n```\n\nUse this parameter if you want to add additional cache behaviors to the CloudFormation resources.\n\n---\n\n### Command-line Parameters\n\n\n**--no-delete-contents**\n\n_optional_, default `false` (deletes contents by default)\n\n```bash\nserverless client deploy --no-delete-contents\n```\n\nUse this parameter if you do not want to delete the contents of your bucket before deployment. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-generate-client**\n\n_optional_, default `false` (generates client code by default if `clientCommand` and `clientSrcPath` are configured)\n\n```bash\nserverless client deploy --no-generate-client\n```\n\nUse this parameter if you do not want to generate the client code before deploying. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-client-deploy**\n\n_optional_, default `false` (deploys the generated client code by default)\n\n```bash\nserverless deploy --no-client-deploy\n```\n\nUse this parameter if you do not want to deploy the client along with the rest of the serverless stack. Almost certainly in this case you don't want to generate the client code either and will want to use \n```bash\nserverless deploy --no-generate-client --no-client-deploy\n```\n\n---\n\n**--no-confirm**\n\n_optional_, default `false` (disables confirmation prompt)\n\n```bash\nserverless client deploy --no-confirm\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds.\n\n---\n\n**--no-invalidate-distribution**\n\n_optional_, default `false` (disables creating an invalidation for the CloudFront distribution)\n\n```bash\nserverless client deploy --no-invalidate-distribution\n```\n\nUse this parameter if you do not want to invalidate the CloudFront distribution. Invalidations are  for the path `/*`.\n\n---\n\n## Maintainers\n- Andy Hahn - [andrewphahn](https://github.com/andrewphahn) from [_MadSkills.io_](http://madskills.io)\n\n## Contributors\n- [jlaramie](https://github.com/jlaramie)\n- [superandrew213](https://github.com/superandrew213)\n- [harmon25](https://github.com/harmon25)\n- [jmortlock](https://github.com/jmortlock)\n- [haochang](https://github.com/haochang)\n- [hakimio](https://github.com/hakimio)\n- [artoliukkonen](https://github.com/artoliukkonen)\n- [pecirep](https://github.com/pecirep)\n- [miguel-a-calles-mba](https://github.com/miguel-a-calles-mba)\n\n## Credits\nForked from the [**serverless-api-cloudfront**](https://github.com/Droplr/serverless-api-cloudfront/)  \nBorrowed heavily from the [**serverless-finch**](https://github.com/fernando-mc/serverless-finch/)  \nInitial CloudFormation template from [**Full Stack Serverless Web Apps with AWS**](https://medium.com/99xtechnology/full-stack-serverless-web-apps-with-aws-189d87da024a/)  \nInspiration from [**serverless-stack.com**](https://serverless-stack.com/)\n","readmeFilename":"README.md","gitHead":"624cafd38fa697baa3929861856037951a8fb0ed","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.8.1-beta.6","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-lv+WVwVCCNeYZm8J3LrIUBAonatIZetq6hUkJyQ1ZeIHwbEPjGSuE6mo5C7FYCtq/YHMe07GynXW7WJFFXP4Yg==","shasum":"5f2de44846fa6e97e63ce9b53e8859406895a3c1","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.8.1-beta.6.tgz","fileCount":11,"unpackedSize":69454,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtxfi9I8/pUglNAJke0ElgZSfxKw6ZaEU/UfiEbWeREQIgQ7JH7eiZxhfHyS9b5keb6R4PhhfQLkqadC5jg4bX000="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUfGtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrv3Q//Wf4ge7Jl9L/lTMDwQN2ggAdUCayTDu2PGAtdr4xm7uXbnCMt\r\nVrYLLJiI9NT+F4dYYNGqM91gFv9wxuG7i58qLVmyQ9jyg/Vta4pq83DVV94B\r\nmVXX6P4TFqwnRXHZzckKof7TVx14GcxKfJHBF8D8EKADfcyhegNYH0LRnc2p\r\n3JBnSQnRQZmilovLU0qwe7jDdMrTkJmWjgEH/7YFzoaE75HpmfFg2OCKz7Kc\r\nyBFVRIDLWFm9R5jp5HttkXNXu92CrCTJHCPYln00UDx9q2nP+TqoLVE2TR86\r\nK9rfwbBZxPVUDN29wkAZ8L3M/0u3kTsARZN/EUoX5WQZkupR6frlrhwhY8LW\r\nH09//vUc9M1dEPpndKWZdC/m/HbSTL8L8g8fteochqeG7qQ2uqr59sX0s/EZ\r\nmFOp7YJidcu2xsrIAaSyNIKVfInBS6vTq+4Y0s7CeSJ2dU9U+kS0wNa9nIMP\r\nfYtFWNGhTmkxaaGZokppZbI3FXZQTUU9sS0JyTo4P6JqzaG3JYL/O9LcTwUX\r\nOyy6AGyrmC+QDVfdbBePfOlYzfBhrXKyoy9IDpsPfteMs/H/1zeFVKuaVwWx\r\n9FdDNg1m7K22mrqhxaWcneAsspxCiVIDXLhBpcN83KkoX0jGPYGpaKnq0Jm7\r\nc78SqG04pSuExFSFRe3PN8rZNYwxysuDKE8=\r\n=MMJL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.8.1-beta.6_1649537452862_0.041222833992751395"},"_hasShrinkwrap":false},"0.8.1-beta.8":{"name":"@animus-bi/fs-sls","version":"0.8.1-beta.8","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit"},"readme":"# fullstack-serverless\n\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n[![npm version](https://badge.fury.io/js/fullstack-serverless.svg)](https://badge.fury.io/js/fullstack-serverless)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/MadSkills-io/fullstack-serverless/master/LICENSE)\n[![npm downloads](https://img.shields.io/npm/dt/fullstack-serverless.svg?style=flat)](https://www.npmjs.com/package/fullstack-serverless)\n\nA [serverless](http://www.serverless.com) plugin that automatically creates an AWS CloudFront distribution that serves static web content from S3 and optionally routes API traffic to API Gateway.  \n\nHome page - https://www.madskills.io/fullstack-serverless/\n\n**:zap: Pros**\n\n- Allows you to set-up custom domain for a S3 hosted site and API Gateway\n- Free SSL using AWS CertificateManager\n- No CORS needed\n- Enables CDN caching of resources - so you don't waste Lambda invocations or API Gateway traffic\n  for serving static files (just [set Cache-Control headers](https://serverless.com/framework/docs/providers/aws/events/apigateway/#custom-response-headers) in API responses)\n- More CloudWatch statistics of API usage (like bandwidth metrics)\n- Real world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n- [Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n- Can be used to manage S3 content and CloudFront without API Gateway by simply not defining any functions\n\n## Before you begin\n* Install the serverless framework\n```bash\nnpm install -g serverless\n```\n* [Setup an AWS account and configure access](https://serverless.com/framework/docs/providers/aws/guide/credentials/)\n\n## Getting started\n**First**, Install and configure\n\n#### Installation\n\n```bash\nnpm install --save-dev fullstack-serverless\n```\n\n#### Configuration\n\n* All fullstack-serverless configuration parameters are optional - e.g. don't provide ACM Certificate ARN\n  to use default CloudFront certificate (which works only for default cloudfront.net domain).\n* This plugin **does not** set-up automatically Route53 for newly created CloudFront distribution.\n  After creating CloudFront distribution, manually add Route53 ALIAS record pointing to your\n  CloudFront domain name.\n* First deployment may be quite long (e.g. 10 min) as Serverless is waiting for\n  CloudFormation to deploy CloudFront distribution.\n\n\n```yaml\n# add to your serverless.yml\n\nplugins:\n  - fullstack-serverless\n\ncustom:\n  fs-sls:\n    domain: my-custom-domain.com\n    certificate: arn:aws:acm:us-east-1:...     # The ARN for the SSL cert to use form AWS CertificateManager\n    bucketName: webapp-deploy                  # Unique name for the S3 bucket to host the client assets\n    omitBucketPrefix: false                    # If 'true', will not prefix bucketName with `${self:service}-${self:provider.stage}-`\n    distributionFolder: client/dist            # Path to the client assets to be uploaded to S3\n    indexDocument: index.html                  # The index document to use\n    errorDocument: error.html                  # The error document to use\n    singlePageApp: false                       # If true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    invalidationPaths:                         # Custom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n      - /index.html\n      - /error.html\n    compressWebContent: true                   # Use compression when serving web content\n    apiPath: api                               # The path prefix for your API Gateway lambdas. The path for the lambda http event trigger needs to start with this too eg. api/myMethod\n    originPath: /${self:provider.stage}         # The origin path attached to the CloudFront <-> API Gateway reverse proxy\n    apiGatewayRestApiId: a12bc34df5            # If \"Api Gateway Rest Api\" is not part of the same serverless template, you can set your API id here \n    clientCommand: gulp dist                   # Command to generate the client assets. Defaults to doing nothing\n    clientSrcPath: client                      # The path to where you want to run the clientCommand\n    waf: 00000000-0000-0000-0000-000000000000  # ID of the Web Application Firewall. Defaults to not used\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    minimumProtocolVersion: TLSv1.2_2018\n    priceClass: PriceClass_100\n    noConfirm: false                           # Alternative to --no-confirm flag. Use this parameter if you do not want a confirmation prompt to interrupt automated builds.\n```\n\n\n**Second**, Create a website folder in the root directory of your Serverless project. This is where your distribution-ready website should live. By default the plugin expects the files to live in a folder called `client/dist`. But this is configurable with the `distributionFolder` option (see the [Configuration Parameters](#configuration-parameters) below).\n\nThe plugin uploads the entire `distributionFolder` to S3 and configures the bucket to host the website and make it publicly available, also setting other options based the [Configuration Parameters](#configuration-parameters) specified in `serverless.yml`.\n\nTo test the plugin initially you can copy/run the following commands in the root directory of your Serverless project to get a quick sample website for deployment:\n\n```bash\nmkdir -p client/dist\ntouch client/dist/index.html\ntouch client/dist/error.html\necho \"Go Serverless\" >> client/dist/index.html\necho \"error page\" >> client/dist/error.html\n```\n\n**Third**, run the plugin (this can take several minutes the first time), and visit your new website!\n\n```bash\nserverless deploy [--no-delete-contents] [--no-generate-client]\n```\n\nThe plugin should output the location of your newly deployed static site to the console.\n\n**Note:** *See [Command-line Parameters](#command-line-parameters) for details on command above*\n\n**WARNING:** The plugin will overwrite any data you have in the bucket name you set above if it already exists.\n\nTo just generate and deploy your client code:\n\n```bash\nserverless client deploy [--no-delete-contents] [--no-generate-client]\n```\n\nIf later on you want to take down the website you can use:\n\n```bash\nserverless client remove\n```\n\n### Configuration Parameters\n\n**bucketName**\n\n_required_\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    bucketName: [unique-s3-bucketname]\n    ...\n```\n\nUse this parameter to specify a unique name for the S3 bucket that your files will be uploaded to.\n\n---\n\n**omitBucketPrefix**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    omitBucketPrefix: false\n    ...\n```\n\nSet this parameter to `true` to create an S3 bucket that precisely matches `bucketName` without the {service}-{stage} prefix\n\n---\n\n**distributionFolder**\n\n_optional_, default: `client/dist`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    distributionFolder: [path/to/files]\n    ...\n```\n\nUse this parameter to specify the path that contains your website files to be uploaded. This path is relative to the path that your `serverless.yaml` configuration files resides in.\n\n---\n\n**apiPath**\n\n_optional_, default: `api`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    apiPath: api\n    ...\n```\n\nUse this parameter to specify the path prefix your API Gateway methods will be available through on your CloudFront distribution (custom domain)\n\n* If `http` events are defined, `apiPath` must be included in the path for the lambdas you want exposed through CloudFront (your custom domain). Not all your methods need to be exposed through CloudFront. For some things, esp. those that are not public facing (eg. third party web hooks) you may want to use the ApiGateway URL and not expose them through CloudFront to control access and cost.\n\n```yaml\nfunctions:\n  message:\n    handler: message.handler\n    timeout: 30\n    events:\n      - http:\n        path: ${self:custom.fullstack.apiPath}/message\n        method: post\n        integration: lambda\n```\n---\n\n**originPath**\n\n_optional_, default: `/${self:provider.stage}`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    originPath: /customOriginPath\n    ...\n```\n\nUse this parameter to specify the origin path that CloudFront will use to reverse proxy requests to API Gateway.\n\n---\n\n**apiGatewayRestApiId**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    apiGatewayRestApiId: a12bc34df5\n    ...\n```\n\nThis is only needed if \"Api Gateway Rest Api\" is not part of the same serverless template and the API id is not defined in [provider -> apiGateway](https://serverless.com/framework/docs/providers/aws/events/apigateway/#share-api-gateway-and-api-resources) section.\nThe id can be found in API Gateway url. For example, if your Rest API url is `https://a12bc34df5.execute-api.eu-central-1.amazonaws.com`, API id will be `a12bc34df5`. \n\n---\n\n**certificate**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    certificate: arn:aws:acm:us-east-1:...\n    ...\n```\n\nUse this parameter to specify ARN for the SSL cert to use form AWS CertificateManager\n\n---\n\n**indexDocument**\n\n_optional_, default: `index.html`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    indexDocument: [file-name.ext]\n    ...\n```\n\nThe name of your index document inside your `distributionFolder`. This is the file that will be served to a client visiting the base URL for your website.\n\n---\n\n**domain**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    domain: my-custom-domain.com\n    ...\n```\n\n`domain` can be a list, if you want to add more domains:\n```yaml\ncustom:\n  fs-sls:\n    ...\n    domain:\n    - my-custom-domain.com\n    - secondary-custom-domain.com\n    ...\n```\n\nThe custom domain for your fullstack serverless app.\n\n---\n\n**errorDocument**\n\n_optional_, default: `error.html`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    errorDocument: [file-name.ext]\n    ...\n```\n\nThe name of your error document inside your `distributionFolder`. This is the file that will be served to a client if their initial request returns an error (e.g. 404). For an SPA, you may want to set this to the same document specified in `indexDocument` so that all requests are redirected to your index document and routing can be handled on the client side by your SPA.\n\n---\n\n**objectHeaders** \n\n_optional_, no default\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    objectHeaders:\n      ALL_OBJECTS:\n        - name: header-name\n          value: header-value\n        ...\n      specific-directory/:\n        - name: header-name\n          value: header-value\n        ...\n      specific-file.ext:\n        - name: header-name\n          value: header-value\n        ...\n      ... # more file- or folder-specific rules\n    ...\n```\n\nUse the `objectHeaders` option to set HTTP response headers be sent to clients requesting uploaded files from your website. \n\nHeaders may be specified globally for all files in the bucket by adding a `name`, `value` pair to the `ALL_OBJECTS` property of the `objectHeaders` option. They may also be specified for specific folders or files within your site by specifying properties with names like `specific-directory/` (trailing slash required to indicate folder) or `specific-file.ext`, where the folder and/or file paths are relative to `distributionFolder`. \n\nHeaders with more specificity will take precedence over more general ones. For instance, if 'Cache-Control' was set to 'max-age=100' in `ALL_OBJECTS` and to 'max-age=500' in `my/folder/`, the files in `my/folder/` would get a header of 'Cache-Control: max-age=500'.\n\n---\n\n**singlePageApp**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    singlePageApp: true\n    ...\n```\n\nIf true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    \n---\n\n**invalidationPaths**\n\n_optional_, default: `['/*']`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    invalidationPaths:\n      - /index.html\n      - /error.html\n    ...\n```\n\nCustom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n    \n---\n\n**compressWebContent**\n\n_optional_, default: `true`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    compressWebContent: true\n    ...\n```\n\nInstruct CloudFront to use compression when serving web content, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the Amazon CloudFront Developer Guide.\n    \n---\n\n**clientCommand**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    clientCommand: [command to generate your client (e.g. gulp dist)]\n    ...\n```\n\nCommand to generate the client assets. Defaults to doing nothing\n       \n---\n\n**clientSrcPath**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    clientSrcPath: [path/to/your/client]\n    ...\n```\n\nThe path to where you want to run the `clientCommand`    \n       \n---\n\n**waf**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    waf: [web application firewall ARN]\n    ...\n```\n\n[Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n         \n---\n\n**logging**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    ...\n```\n\nReal world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n         \n---\n\n**priceClass**\n\n_optional_, default: `PriceClass_All`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    priceClass: PriceClass_100\n    ...\n```\n\nCloudFront [PriceClass](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - can be PriceClass_All (default), PriceClass_100 or PriceClass_200\n\n---\n\n**minimumProtocolVersion**\n\n_optional_, default: `TLSv1`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    minimumProtocolVersion: TLSv1.2_2018\n    ...\n```\n\nSet minimum SSL/TLS [protocol version](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-MinimumProtocolVersion) - `TLSv1_2016`, `TLSv1.1_2016`, `TLSv1.2_2018` or `SSLv3`\n\n- The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers\n- The cipher that CloudFront uses to encrypt the content that it returns to viewers\n\n---\n\n**noConfirm**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    noConfirm: true\n    ...\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds. If either this or `--no-confirm` CLI parameter is true the confirmation prompt will be disabled. \n\n---\n\n**origins**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    origins:\n      - Id: Media\n        DomainName: \n          Fn::GetAtt:\n            - MediaBucket\n            - DomainName\n        S3OriginConfig:\n          OriginAccessIdentity:\n            Fn::Join:\n              - ''\n              - - origin-access-identity/cloudfront/\n                - { Ref: S3OriginAccessIdentity }\n    ...\n```\n\nUse this parameter if you want to add additional origins to the CloudFormation resources.\n\n---\n\n**defaultCacheBehavior**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    defaultCacheBehavior:\n      MinTTL: 3600\n    ...\n```\n\n---\n\n**cacheBehaviors**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    cacheBehaviors:\n      - TargetOriginId: Media\n        PathPattern: media/*\n        AllowedMethods:\n          - GET\n          - HEAD\n          - OPTIONS\n        CachedMethods:\n          - HEAD\n          - GET\n        ForwardedValues:\n          QueryString: true\n          Headers:\n            - Accept\n            - Referer\n            - Authorization\n            - Content-Type\n        ViewerProtocolPolicy: redirect-to-https\n        ...\n    ...\n```\n\nUse this parameter if you want to add additional cache behaviors to the CloudFormation resources.\n\n---\n\n### Command-line Parameters\n\n\n**--no-delete-contents**\n\n_optional_, default `false` (deletes contents by default)\n\n```bash\nserverless client deploy --no-delete-contents\n```\n\nUse this parameter if you do not want to delete the contents of your bucket before deployment. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-generate-client**\n\n_optional_, default `false` (generates client code by default if `clientCommand` and `clientSrcPath` are configured)\n\n```bash\nserverless client deploy --no-generate-client\n```\n\nUse this parameter if you do not want to generate the client code before deploying. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-client-deploy**\n\n_optional_, default `false` (deploys the generated client code by default)\n\n```bash\nserverless deploy --no-client-deploy\n```\n\nUse this parameter if you do not want to deploy the client along with the rest of the serverless stack. Almost certainly in this case you don't want to generate the client code either and will want to use \n```bash\nserverless deploy --no-generate-client --no-client-deploy\n```\n\n---\n\n**--no-confirm**\n\n_optional_, default `false` (disables confirmation prompt)\n\n```bash\nserverless client deploy --no-confirm\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds.\n\n---\n\n**--no-invalidate-distribution**\n\n_optional_, default `false` (disables creating an invalidation for the CloudFront distribution)\n\n```bash\nserverless client deploy --no-invalidate-distribution\n```\n\nUse this parameter if you do not want to invalidate the CloudFront distribution. Invalidations are  for the path `/*`.\n\n---\n\n## Maintainers\n- Andy Hahn - [andrewphahn](https://github.com/andrewphahn) from [_MadSkills.io_](http://madskills.io)\n\n## Contributors\n- [jlaramie](https://github.com/jlaramie)\n- [superandrew213](https://github.com/superandrew213)\n- [harmon25](https://github.com/harmon25)\n- [jmortlock](https://github.com/jmortlock)\n- [haochang](https://github.com/haochang)\n- [hakimio](https://github.com/hakimio)\n- [artoliukkonen](https://github.com/artoliukkonen)\n- [pecirep](https://github.com/pecirep)\n- [miguel-a-calles-mba](https://github.com/miguel-a-calles-mba)\n\n## Credits\nForked from the [**serverless-api-cloudfront**](https://github.com/Droplr/serverless-api-cloudfront/)  \nBorrowed heavily from the [**serverless-finch**](https://github.com/fernando-mc/serverless-finch/)  \nInitial CloudFormation template from [**Full Stack Serverless Web Apps with AWS**](https://medium.com/99xtechnology/full-stack-serverless-web-apps-with-aws-189d87da024a/)  \nInspiration from [**serverless-stack.com**](https://serverless-stack.com/)\n","readmeFilename":"README.md","gitHead":"029943eae9cd3dde4994df9e5f64083c7a77dd8b","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.8.1-beta.8","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-pFrpZ6InJ68afMF56hsT6DAILUQIEEgJzANxH+g7ctP4H+98X40WUqYdKitXzXnkOAAU+cnFAAofvXt/FUgtjg==","shasum":"d7c7110aef6a7048f26d2712526b00e0617d48dc","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.8.1-beta.8.tgz","fileCount":11,"unpackedSize":69376,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHsmn8KebwdqVXsu8F7bTppRZdn+E4O6+Z2B1nBkLN3sAiEAzYgrTovBNjc80Y70mDGu9ec8Lkm+deqPQ6v7KHJsJrQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUfIOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIyxAAli1qHZY7HAGXbpSdCJ3oSsFsc0gmUw4TZFhpwg68T6eV2xSy\r\nZt7BRvKlzLipMKpktbSNMHfdgF0oYa/3CRso4xRKHtNO7h/Ny5c7VyrM5ahB\r\nyRfFO+eu966FBbtgOcFR7G+VlAC7CFTjOMt1ETvsq4Pz6jgFnc0fUO54agpY\r\n1TaeHWlw4QZdwv0CKq1cTOx4ES8SWA61svjtopXgfdgqYj9K69FsGjgD+W/X\r\n6H1GIB7jgHHSHC3B0ptxmwGl+rVGCSpVzXQOCYPy0+XiY/jxOMfPVxR5BIT/\r\ntWjZrQ7Pab4EFNBlzIzeMtwvNzlN48oyH42XUY4vvi80JHlt9ACmM/sf9v19\r\nnFNVItIFxswCvF2DwcuEqdkq2KcHhlCGKUhwrCBGn/ZWyf0ZblqW1ktXu7OD\r\nv43XqXwUZCL/vPi8A/ArV7m6e2PXc01p6qTSDbQCefTFIOfE0A2G8lxKeRkK\r\nI4Lyu6k/fBlO6waLHPeklThsZUCy2r5YfTA/pKzr4JIk8WobLfi4Q7L/+BRc\r\nSiQgLiHAxOLD+BZ5swfW/DfWWGBSPty+hNeTg5J5X7ur9RwboGzRBcT86iSr\r\nQedhF3ftiMibXx0CW9o9ZjAsehwgBcjx3orXkMYasZOut6hBsQf3BAm6Yxv6\r\nBqrRR12kD1z5PpSZhSgink/GfpU4ywS89+0=\r\n=HofU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.8.1-beta.8_1649537550710_0.7323360025607868"},"_hasShrinkwrap":false},"0.9.0":{"name":"@animus-bi/fs-sls","version":"0.9.0","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","version:minor":"npm version minor --no-git-tag","publish:minor":"npm publish --tag minor --access public"},"readme":"# fs-sls\n\n[![serverless](http://public.serverless.com/badges/v3.svg)](http://www.serverless.com)\n[![npm version](https://badge.fury.io/js/fullstack-serverless.svg)](https://badge.fury.io/js/fullstack-serverless)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/MadSkills-io/fullstack-serverless/master/LICENSE)\n[![npm downloads](https://img.shields.io/npm/dt/fullstack-serverless.svg?style=flat)](https://www.npmjs.com/package/fullstack-serverless)\n\nA [serverless](http://www.serverless.com) plugin that automatically creates an AWS CloudFront distribution that serves static web content from S3 and optionally routes API traffic to API Gateway.  \n\nHome page - https://www.madskills.io/fullstack-serverless/\n\n**:zap: Pros**\n\n- Allows you to set-up custom domain for a S3 hosted site and API Gateway\n- Free SSL using AWS CertificateManager\n- No CORS needed\n- Enables CDN caching of resources - so you don't waste Lambda invocations or API Gateway traffic\n  for serving static files (just [set Cache-Control headers](https://serverless.com/framework/docs/providers/aws/events/apigateway/#custom-response-headers) in API responses)\n- More CloudWatch statistics of API usage (like bandwidth metrics)\n- Real world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n- [Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n- Can be used to manage S3 content and CloudFront without API Gateway by simply not defining any functions\n\n## Before you begin\n* Install the serverless framework\n```bash\nnpm install -g serverless\n```\n* [Setup an AWS account and configure access](https://serverless.com/framework/docs/providers/aws/guide/credentials/)\n\n## Getting started\n**First**, Install and configure\n\n#### Installation\n\n```bash\nnpm install --save-dev fullstack-serverless\n```\n\n#### Configuration\n\n* All fullstack-serverless configuration parameters are optional - e.g. don't provide ACM Certificate ARN\n  to use default CloudFront certificate (which works only for default cloudfront.net domain).\n* This plugin **does not** set-up automatically Route53 for newly created CloudFront distribution.\n  After creating CloudFront distribution, manually add Route53 ALIAS record pointing to your\n  CloudFront domain name.\n* First deployment may be quite long (e.g. 10 min) as Serverless is waiting for\n  CloudFormation to deploy CloudFront distribution.\n\n\n```yaml\n# add to your serverless.yml\n\nplugins:\n  - fullstack-serverless\n\ncustom:\n  fs-sls:\n    domain: my-custom-domain.com\n    certificate: arn:aws:acm:us-east-1:...     # The ARN for the SSL cert to use form AWS CertificateManager\n    bucketName: webapp-deploy                  # Unique name for the S3 bucket to host the client assets\n    omitBucketPrefix: false                    # If 'true', will not prefix bucketName with `${self:service}-${self:provider.stage}-`\n    distributionFolder: client/dist            # Path to the client assets to be uploaded to S3\n    indexDocument: index.html                  # The index document to use\n    errorDocument: error.html                  # The error document to use\n    singlePageApp: false                       # If true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    invalidationPaths:                         # Custom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n      - /index.html\n      - /error.html\n    compressWebContent: true                   # Use compression when serving web content\n    apiPath: api                               # The path prefix for your API Gateway lambdas. The path for the lambda http event trigger needs to start with this too eg. api/myMethod\n    originPath: /${self:provider.stage}         # The origin path attached to the CloudFront <-> API Gateway reverse proxy\n    apiGatewayRestApiId: a12bc34df5            # If \"Api Gateway Rest Api\" is not part of the same serverless template, you can set your API id here \n    clientCommand: gulp dist                   # Command to generate the client assets. Defaults to doing nothing\n    clientSrcPath: client                      # The path to where you want to run the clientCommand\n    waf: 00000000-0000-0000-0000-000000000000  # ID of the Web Application Firewall. Defaults to not used\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    minimumProtocolVersion: TLSv1.2_2018\n    priceClass: PriceClass_100\n    noConfirm: false                           # Alternative to --no-confirm flag. Use this parameter if you do not want a confirmation prompt to interrupt automated builds.\n```\n\n\n**Second**, Create a website folder in the root directory of your Serverless project. This is where your distribution-ready website should live. By default the plugin expects the files to live in a folder called `client/dist`. But this is configurable with the `distributionFolder` option (see the [Configuration Parameters](#configuration-parameters) below).\n\nThe plugin uploads the entire `distributionFolder` to S3 and configures the bucket to host the website and make it publicly available, also setting other options based the [Configuration Parameters](#configuration-parameters) specified in `serverless.yml`.\n\nTo test the plugin initially you can copy/run the following commands in the root directory of your Serverless project to get a quick sample website for deployment:\n\n```bash\nmkdir -p client/dist\ntouch client/dist/index.html\ntouch client/dist/error.html\necho \"Go Serverless\" >> client/dist/index.html\necho \"error page\" >> client/dist/error.html\n```\n\n**Third**, run the plugin (this can take several minutes the first time), and visit your new website!\n\n```bash\nserverless deploy [--no-delete-contents] [--no-generate-client]\n```\n\nThe plugin should output the location of your newly deployed static site to the console.\n\n**Note:** *See [Command-line Parameters](#command-line-parameters) for details on command above*\n\n**WARNING:** The plugin will overwrite any data you have in the bucket name you set above if it already exists.\n\nTo just generate and deploy your client code:\n\n```bash\nserverless client deploy [--no-delete-contents] [--no-generate-client]\n```\n\nIf later on you want to take down the website you can use:\n\n```bash\nserverless client remove\n```\n\n### Configuration Parameters\n\n**bucketName**\n\n_required_\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    bucketName: [unique-s3-bucketname]\n    ...\n```\n\nUse this parameter to specify a unique name for the S3 bucket that your files will be uploaded to.\n\n---\n\n**omitBucketPrefix**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    omitBucketPrefix: false\n    ...\n```\n\nSet this parameter to `true` to create an S3 bucket that precisely matches `bucketName` without the {service}-{stage} prefix\n\n---\n\n**distributionFolder**\n\n_optional_, default: `client/dist`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    distributionFolder: [path/to/files]\n    ...\n```\n\nUse this parameter to specify the path that contains your website files to be uploaded. This path is relative to the path that your `serverless.yaml` configuration files resides in.\n\n---\n\n**apiPath**\n\n_optional_, default: `api`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    apiPath: api\n    ...\n```\n\nUse this parameter to specify the path prefix your API Gateway methods will be available through on your CloudFront distribution (custom domain)\n\n* If `http` events are defined, `apiPath` must be included in the path for the lambdas you want exposed through CloudFront (your custom domain). Not all your methods need to be exposed through CloudFront. For some things, esp. those that are not public facing (eg. third party web hooks) you may want to use the ApiGateway URL and not expose them through CloudFront to control access and cost.\n\n```yaml\nfunctions:\n  message:\n    handler: message.handler\n    timeout: 30\n    events:\n      - http:\n        path: ${self:custom.fullstack.apiPath}/message\n        method: post\n        integration: lambda\n```\n---\n\n**originPath**\n\n_optional_, default: `/${self:provider.stage}`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    originPath: /customOriginPath\n    ...\n```\n\nUse this parameter to specify the origin path that CloudFront will use to reverse proxy requests to API Gateway.\n\n---\n\n**apiGatewayRestApiId**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    apiGatewayRestApiId: a12bc34df5\n    ...\n```\n\nThis is only needed if \"Api Gateway Rest Api\" is not part of the same serverless template and the API id is not defined in [provider -> apiGateway](https://serverless.com/framework/docs/providers/aws/events/apigateway/#share-api-gateway-and-api-resources) section.\nThe id can be found in API Gateway url. For example, if your Rest API url is `https://a12bc34df5.execute-api.eu-central-1.amazonaws.com`, API id will be `a12bc34df5`. \n\n---\n\n**certificate**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    certificate: arn:aws:acm:us-east-1:...\n    ...\n```\n\nUse this parameter to specify ARN for the SSL cert to use form AWS CertificateManager\n\n---\n\n**indexDocument**\n\n_optional_, default: `index.html`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    indexDocument: [file-name.ext]\n    ...\n```\n\nThe name of your index document inside your `distributionFolder`. This is the file that will be served to a client visiting the base URL for your website.\n\n---\n\n**domain**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    domain: my-custom-domain.com\n    ...\n```\n\n`domain` can be a list, if you want to add more domains:\n```yaml\ncustom:\n  fs-sls:\n    ...\n    domain:\n    - my-custom-domain.com\n    - secondary-custom-domain.com\n    ...\n```\n\nThe custom domain for your fullstack serverless app.\n\n---\n\n**errorDocument**\n\n_optional_, default: `error.html`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    errorDocument: [file-name.ext]\n    ...\n```\n\nThe name of your error document inside your `distributionFolder`. This is the file that will be served to a client if their initial request returns an error (e.g. 404). For an SPA, you may want to set this to the same document specified in `indexDocument` so that all requests are redirected to your index document and routing can be handled on the client side by your SPA.\n\n---\n\n**objectHeaders** \n\n_optional_, no default\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    objectHeaders:\n      ALL_OBJECTS:\n        - name: header-name\n          value: header-value\n        ...\n      specific-directory/:\n        - name: header-name\n          value: header-value\n        ...\n      specific-file.ext:\n        - name: header-name\n          value: header-value\n        ...\n      ... # more file- or folder-specific rules\n    ...\n```\n\nUse the `objectHeaders` option to set HTTP response headers be sent to clients requesting uploaded files from your website. \n\nHeaders may be specified globally for all files in the bucket by adding a `name`, `value` pair to the `ALL_OBJECTS` property of the `objectHeaders` option. They may also be specified for specific folders or files within your site by specifying properties with names like `specific-directory/` (trailing slash required to indicate folder) or `specific-file.ext`, where the folder and/or file paths are relative to `distributionFolder`. \n\nHeaders with more specificity will take precedence over more general ones. For instance, if 'Cache-Control' was set to 'max-age=100' in `ALL_OBJECTS` and to 'max-age=500' in `my/folder/`, the files in `my/folder/` would get a header of 'Cache-Control: max-age=500'.\n\n---\n\n**singlePageApp**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    singlePageApp: true\n    ...\n```\n\nIf true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    \n---\n\n**invalidationPaths**\n\n_optional_, default: `['/*']`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    invalidationPaths:\n      - /index.html\n      - /error.html\n    ...\n```\n\nCustom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n    \n---\n\n**compressWebContent**\n\n_optional_, default: `true`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    compressWebContent: true\n    ...\n```\n\nInstruct CloudFront to use compression when serving web content, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the Amazon CloudFront Developer Guide.\n    \n---\n\n**clientCommand**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    clientCommand: [command to generate your client (e.g. gulp dist)]\n    ...\n```\n\nCommand to generate the client assets. Defaults to doing nothing\n       \n---\n\n**clientSrcPath**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    clientSrcPath: [path/to/your/client]\n    ...\n```\n\nThe path to where you want to run the `clientCommand`    \n       \n---\n\n**waf**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    waf: [web application firewall ARN]\n    ...\n```\n\n[Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n         \n---\n\n**logging**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    ...\n```\n\nReal world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n         \n---\n\n**priceClass**\n\n_optional_, default: `PriceClass_All`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    priceClass: PriceClass_100\n    ...\n```\n\nCloudFront [PriceClass](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - can be PriceClass_All (default), PriceClass_100 or PriceClass_200\n\n---\n\n**minimumProtocolVersion**\n\n_optional_, default: `TLSv1`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    minimumProtocolVersion: TLSv1.2_2018\n    ...\n```\n\nSet minimum SSL/TLS [protocol version](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-MinimumProtocolVersion) - `TLSv1_2016`, `TLSv1.1_2016`, `TLSv1.2_2018` or `SSLv3`\n\n- The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers\n- The cipher that CloudFront uses to encrypt the content that it returns to viewers\n\n---\n\n**noConfirm**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    noConfirm: true\n    ...\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds. If either this or `--no-confirm` CLI parameter is true the confirmation prompt will be disabled. \n\n---\n\n**origins**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    origins:\n      - Id: Media\n        DomainName: \n          Fn::GetAtt:\n            - MediaBucket\n            - DomainName\n        S3OriginConfig:\n          OriginAccessIdentity:\n            Fn::Join:\n              - ''\n              - - origin-access-identity/cloudfront/\n                - { Ref: S3OriginAccessIdentity }\n    ...\n```\n\nUse this parameter if you want to add additional origins to the CloudFormation resources.\n\n---\n\n**defaultCacheBehavior**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    defaultCacheBehavior:\n      MinTTL: 3600\n    ...\n```\n\n---\n\n**cacheBehaviors**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    cacheBehaviors:\n      - TargetOriginId: Media\n        PathPattern: media/*\n        AllowedMethods:\n          - GET\n          - HEAD\n          - OPTIONS\n        CachedMethods:\n          - HEAD\n          - GET\n        ForwardedValues:\n          QueryString: true\n          Headers:\n            - Accept\n            - Referer\n            - Authorization\n            - Content-Type\n        ViewerProtocolPolicy: redirect-to-https\n        ...\n    ...\n```\n\nUse this parameter if you want to add additional cache behaviors to the CloudFormation resources.\n\n---\n\n### Command-line Parameters\n\n\n**--no-delete-contents**\n\n_optional_, default `false` (deletes contents by default)\n\n```bash\nserverless client deploy --no-delete-contents\n```\n\nUse this parameter if you do not want to delete the contents of your bucket before deployment. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-generate-client**\n\n_optional_, default `false` (generates client code by default if `clientCommand` and `clientSrcPath` are configured)\n\n```bash\nserverless client deploy --no-generate-client\n```\n\nUse this parameter if you do not want to generate the client code before deploying. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-client-deploy**\n\n_optional_, default `false` (deploys the generated client code by default)\n\n```bash\nserverless deploy --no-client-deploy\n```\n\nUse this parameter if you do not want to deploy the client along with the rest of the serverless stack. Almost certainly in this case you don't want to generate the client code either and will want to use \n```bash\nserverless deploy --no-generate-client --no-client-deploy\n```\n\n---\n\n**--no-confirm**\n\n_optional_, default `false` (disables confirmation prompt)\n\n```bash\nserverless client deploy --no-confirm\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds.\n\n---\n\n**--no-invalidate-distribution**\n\n_optional_, default `false` (disables creating an invalidation for the CloudFront distribution)\n\n```bash\nserverless client deploy --no-invalidate-distribution\n```\n\nUse this parameter if you do not want to invalidate the CloudFront distribution. Invalidations are  for the path `/*`.\n\n---\n\n## Maintainers\n- Jeremy Wells - [jeremymwells](https://github.com/jeremymwells)\n\n## Contributors\n- everyone from fullstack-serverless\n\n## Credits\nForked from the [**fullstack-serverless**](https://github.com/MadSkills-io/fullstack-serverless)\n","readmeFilename":"README.md","gitHead":"c24712d240532bd0d425b38d36b065f14c03af15","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.9.0","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-AGPSIETB6FuG2auyTde7OTIE5DS6LpIUXGpZct83YhLRX5S3o3piC3Uy6eQXJ9drj7wO6n8eZaNRdvti7X28gA==","shasum":"be3945a3fbd1aff86b9f2c9849e6f41539f49a0d","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.9.0.tgz","fileCount":11,"unpackedSize":68697,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHLyiAg+hSGY/Q9FqOO+NHnomqsJl+KbmUSxBd7d1+u/AiEA0Fuvie5FDblxR1srupJZDD+h7KCDUuIU2xK+F2KH2yc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUfO9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrGw/+Mblq/HD58luT/EylbNjSRbuL0JY2bbPA22nSbwdz9AJ+vXB2\r\nlc3daOJt2Z0py3SrY5aoDNTjTjjZC3IV+umw4D01rXLl4Yr6bsrYpcgTWdXw\r\n95rNheUFubXrMwu0YQ6sX274libhRYiF7l1Lhp48xKZCsz56U2UWWz2rsJ+6\r\n9byUqtLSN+RCWG7JmaT4B1d3Gd7Cf31xZKlWEBtKWTCOqMg8ErZFamH3bJt/\r\nUna2adF99Dl1utnEh4a0StmgiLsN5UQ5iAzpLzUoot76hGThA6sIADL4woNC\r\nbxabJlyxPGdXq22XlsuCq+k7nJvmBjjOGVNO7JyhdTPzw+8/eFlSax5ZsWbv\r\nAg3nRlqjGLEzRdp0xx7z182+0n2Q3iTSC/hqdc3DTO+HrwN1RhSp+mE7cH0y\r\n7AJL3ad537e/IDIJuRc4yiay9BQSX8OWhcJ7/Bjuu/3FprMC2BIBcyGbQG5m\r\nfWUDDfHe97avi31gMVt66E6csp/wf/X54ZBSxkf+jn9fxfLXNvFvK7ylwkCH\r\nvNlnd7870qBSYYAMGa3MMy4ipOskvjtFjK6VvrcgEm1ndKvN7YcABb2ul2DK\r\nZGfeyzndtp7Iql6Lx5lM0rM1eSfCS7VICBILrBTvtLMgme2ntRanFTEvKW2n\r\nhWpx7ER+lx4p8U7EnkWIxYryrJ7okVT6qVE=\r\n=5s7Q\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.9.0_1649537979949_0.13137689115857198"},"_hasShrinkwrap":false},"0.9.1-beta.0":{"name":"@animus-bi/fs-sls","version":"0.9.1-beta.0","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","version:minor":"npm version minor --no-git-tag","publish:minor":"npm publish --tag minor --access public","publish:latest":"npm publish --tag latest --access public"},"gitHead":"ba8c20e991056619b487fd795934a62a747d83fe","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.9.1-beta.0","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-jbyY5W9yeYVf3cJ3iNHsVzP4c/xGlbxpAZwcwkouW5Vsd7UgUsETHxzH5HapiJ+I/FXReXM0m7pmYBj/tABzUg==","shasum":"6be3b62bbde8973f6fda229eeb41df50d7433f18","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.9.1-beta.0.tgz","fileCount":11,"unpackedSize":68234,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBIUiby8JsYPmjHUKIPJVWNF3eq0cliGtyJq2CTxl9tBAiBl5l1S3I1fdxIwcyK9mTV9xypJTq01FbZrZDUhxgomJA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUfWYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoXw//bBxXPrjCQg3T3Bk5oiViD7DPnIuF1d+O0HZfPpUySPZ33cI9\r\nrZlgw1AsQ0EhHYI27gu67bfuOhhMbfpGVnn9eY2kp+OFQttlff6K5tu02MQ1\r\nqy4RmuReSUqjU/SwVMyLH17n5zptpcURbOxJdfk+B3SXR//tPv6nGGc8XVNt\r\nrZPjtG0Hjyk4dmlcACnSxLo0UqZEwM9LWdvYcfygzbhwEktCDMXrVKLFFRE1\r\nr22kBkJ0SPxXiAiIAf9VReWc8jWmutUpg6/v+Z+pQDcb5K+r6Bvfsoxel3vS\r\nX2eLqVMd0wucd+Xqftm8HjaKgzRs2jtDHwmnN1f34GszPnIDX4N3qeBA9/Bx\r\nvDLW7U9vddRguQNC8goMOrwmTDyNnUh/3cqNYuHhd78t/MiOCasqLKHLhnht\r\nJB8F/87oL7rKdBgNcuuFT69aG5bvCOb5VX9wz5WqDyES2PQwm/pr9m7XmcfJ\r\nEQlRMFFhlkL0KLAKlpKR2e7fEHh7ifClM7JV7lwLiCQRMl2aoNHeSvZHMBD7\r\nvjBf9j9T64zmLbR51xPvSBaeH0bRgeZ57uYjVHGgkId2iSeajmEEcYrTs8sJ\r\nFp1bbx4/u7e7ZfNgCTlpuYvQPkDZVhyex+aYxMD6iVNqpueMaPOlKADBlyZ0\r\n199jf1xdSxhs+6JibZmjQBsyTTs50mgIGvc=\r\n=h5kG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.9.1-beta.0_1649538456755_0.7256899800903049"},"_hasShrinkwrap":false},"0.9.1-beta.1":{"name":"@animus-bi/fs-sls","version":"0.9.1-beta.1","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","version:minor":"npm version minor --no-git-tag","publish:minor":"npm publish --tag minor --access public","publish:latest":"npm publish --tag latest --access public"},"gitHead":"ba8c20e991056619b487fd795934a62a747d83fe","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.9.1-beta.1","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-3ezgD+d0HSELeTDxBq13EsUIfwXMidxWxc+kx3tLkDWC65+3uDVXUrsKmyzPisBoaD19GFvRSt/ajRA/H7o4QQ==","shasum":"6cc76f5133c08415cbf9bd52d2a2533588b7ba59","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.9.1-beta.1.tgz","fileCount":11,"unpackedSize":68247,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCydJVbXFSXlKe3Vqn/6p1uKdGdAEG3VLwVVWwdv1qSJAIgIdHoTBPwvAZDSsou8EXnXHLNIsW715lB0UtgLnWbJqQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUfkIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoghAAhrXQl60n/StGq1puYZ7gdZTEYBrD/v5xNLH7ty/1ozl/7CBV\r\nEMGedi28pj+bPf8LJtv1SJy6kpW9ThjwQAFftgc8j5gVPy3BceCsFci2XOwF\r\nZ+ECX9Lz4kWlKN9Honxt43CxQfPe8Bzw+uTKmmdFxK3MF12bhivhGMQxMB+E\r\nVcESVBwAEpD0z6mN92Y/SlNTt1g2bzTUgstoE09gUgHtmPvyXu96qq0gYJIS\r\n8QmZ8ktyOgAz/2k40JzhF0W/fUkbMHyHH2A/nnyrN4b/Bwnvwyjkgg3QCQx8\r\niQ3pLzPvoRZBDE2jSDVaV0f53mOvCnk6ZNIa7kaZOJf425DLhkZG/ZXU9yA2\r\noq6YAdXtgd+4tU8ibcDcUMa1MnE/xIj46QcQPa6zbC/lMlLOBebFKoTixXum\r\n0CO0Nb/ZyKYVnOff6w7OMzlO1gEftkaqRe+IiSUcXG8xOkp3uXU8TWkAyGgj\r\ndqpXSZIYBVB0b7oyZI2oYRdPhX8o4gh8a5SrjxB7yztD8UaveiIEH6kDOMkt\r\nZq/v92hBR3fsXdiXEJaFMzRPkwS7b/t141DbkxGQcL8ogPN4RMur6KBrO2aF\r\nf1BtcY2AkdjOcNr+NHN51oFR6ID0IVnIoqAFGEDoAPvnsXqwYuT0SPIZF4rY\r\nBEp8g9kwQ7u2LIJVYVs8u8nyMmmhZacJakk=\r\n=kzzz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.9.1-beta.1_1649539336448_0.764368693840952"},"_hasShrinkwrap":false},"0.9.1-beta.2":{"name":"@animus-bi/fs-sls","version":"0.9.1-beta.2","engines":{"node":">=4.0"},"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","author":{"name":"Animus-BI"},"license":"MIT","homepage":"https://github.com/animus-bi/fs-sls.git","repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"main":"index.js","dependencies":{"async":"^2.6.0","bluebird":"^3.5.1","chalk":"^2.0.0","is_js":"^0.9.0","js-yaml":"^3.10.0","lodash":"^4.13.1","mime":"^1.2.11","prompt-confirm":"^1.2.0"},"scripts":{"amendCommit":"git add . -A && git commit --amend --no-edit","version:branch":"npm version prerelease --preid $(git rev-parse --short=8 HEAD^) --no-git-tag","prepublish:branch":"npm run version:branch","publish:branch":"npm publish --tag $(git rev-parse --short=8 HEAD^) --access public","postpublish:branch":"npm run amendCommit","version:beta":"npm version prerelease --preid beta --no-git-tag","prepublish:beta":"npm run version:beta","publish:beta":"npm publish --tag beta --access public","postpublish:beta":"npm run amendCommit","version:minor":"npm version minor --no-git-tag","publish:minor":"npm publish --tag minor --access public","publish:latest":"npm publish --tag latest --access public"},"gitHead":"1caca5c668c1d495c1543bbe26e9a9f05e33478d","bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"_id":"@animus-bi/fs-sls@0.9.1-beta.2","_nodeVersion":"12.22.10","_npmVersion":"8.3.1","dist":{"integrity":"sha512-KrHzsTcm+NGuc/24qkPVsvAX3LF9B1UrEc12UmkZ1/uNMGC7Z9cOFp7pSLdT9nmzbHN7g+4N1BrIsjWLXBetMQ==","shasum":"623ba07c09fec5da3267afffb3fb1d0c8a06eccf","tarball":"https://registry.npmjs.org/@animus-bi/fs-sls/-/fs-sls-0.9.1-beta.2.tgz","fileCount":11,"unpackedSize":68244,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3Ym9w8Cq+5+fpkgZPbwIjOSjBwAiOcB38jmak0F+XHQIgT/9CAAaTJSUcQ6M3I1ZV5af9k7wFBn0Sb87Sntd6lCU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUfplACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqK7g/+IwaGgaR3B5g63R9V0czCIvAMC440T27aBpef4L6+z5beDDO4\r\nRg7KTyWMJCpRfDHvwZ96eBxVgrdGvUcoT6YMv6nvuygCL7VArgbGBxIK8lyk\r\nkEk35i0QE0vylSxrQ1TE2vvOxDLd5Tju1znhNjdc0TQLTDSjyzpCIrDhDx6i\r\nxexk59AwteuzZMG+AeuFULETc3gpcqxRJF0BWBQ+UtQugQwtODhMwVT/bOnM\r\nqsYCBG7Vmo4zbMDho4a7HC8gDr7okyOR61l3m0OjPtP2mMH0YSCJYEh4h9Oq\r\nVa7fiyhu3vmhCuRxV6Nr7dVTcDRNBOnIrYPpy7+UkF3Gh6RWClrwUgi6jKEN\r\nPSmess02yBsGYRwCGaVjHUPyiXe8CeDSSszLOR6UNAamIUzqNQvMItKFrIFP\r\nAxnjfzESrh5pnQff0SyKkrA9x0xSZbrcN0TZyCjoNY8cBI9KRhjAHY5CUR9v\r\nN7Xiih9YsQ+xiZT/vNlShdc/QmhaXwrjfOSOBhIqIE4AcIqIW2gjazVPXVWJ\r\nn0ZrC/xpWLmajYuja+8foMIJEO2e2thOpXB3m09zP/oQr1wGkHDa5PMjIczI\r\n7UVwMqF8NS6Y7CGe88NkIfZZXAxvljyl5EyILhtu9RMigoRQqZWJyY066bPS\r\nSCIfztiLgZV/9b4UFslOUUHBIZcnWIWOIRs=\r\n=VwWu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"},"directories":{},"maintainers":[{"name":"jeremymwells","email":"jmw.jeremymwells@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fs-sls_0.9.1-beta.2_1649539685431_0.2879480948916433"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-09T20:43:16.433Z","0.8.1-beta.2":"2022-04-09T20:43:16.622Z","modified":"2022-04-27T15:30:14.737Z","0.8.1-beta.4":"2022-04-09T20:50:01.525Z","0.8.1-beta.6":"2022-04-09T20:50:53.066Z","0.8.1-beta.8":"2022-04-09T20:52:30.873Z","0.9.0":"2022-04-09T20:59:40.973Z","0.9.1-beta.0":"2022-04-09T21:07:36.949Z","0.9.1-beta.1":"2022-04-09T21:22:16.621Z","0.9.1-beta.2":"2022-04-09T21:28:05.678Z"},"maintainers":[{"email":"jmw.jeremymwells@gmail.com","name":"jeremymwells"}],"description":"Deploy a fullstack serverless web app (including React, Angular, Node.js, Python) with an AWS CloudFront distribution in front of your API Gateway and static content from S3. Use your own custom domain, SSL from AWS, and AWS Web Application Firewall.","homepage":"https://github.com/animus-bi/fs-sls.git","keywords":["serverless","fullstack","full stack","serverless plugin","api gateway","cloudfront","s3","cloudformation","lambda","aws","aws lambda","amazon web services","serverless.com"],"repository":{"type":"git","url":"git+https://github.com/animus-bi/fs-sls.git"},"author":{"name":"Animus-BI"},"bugs":{"url":"https://github.com/animus-bi/fs-sls/issues"},"license":"MIT","readme":"# fs-sls\n\nA [serverless](http://www.serverless.com) plugin that automatically creates an AWS CloudFront distribution that serves static web content from S3 and optionally routes API traffic to API Gateway.  \n\nHome page - https://github.com/animus-bi/fs-sls\n\n**:zap: Pros**\n\n- Allows you to set-up custom domain for a S3 hosted site and API Gateway\n- Free SSL using AWS CertificateManager\n- No CORS needed\n- Enables CDN caching of resources - so you don't waste Lambda invocations or API Gateway traffic\n  for serving static files (just [set Cache-Control headers](https://serverless.com/framework/docs/providers/aws/events/apigateway/#custom-response-headers) in API responses)\n- More CloudWatch statistics of API usage (like bandwidth metrics)\n- Real world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n- [Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n- Can be used to manage S3 content and CloudFront without API Gateway by simply not defining any functions\n\n## Before you begin\n* Install the serverless framework\n```bash\nnpm install -g serverless\n```\n* [Setup an AWS account and configure access](https://serverless.com/framework/docs/providers/aws/guide/credentials/)\n\n## Getting started\n**First**, Install and configure\n\n#### Installation\n\n```bash\nnpm install --save-dev @animus-bi/fs-sls\n```\n\n#### Configuration\n\n* All fs-sls configuration parameters are optional - e.g. don't provide ACM Certificate ARN\n  to use default CloudFront certificate (which works only for default cloudfront.net domain).\n* This plugin **does not** set-up automatically Route53 for newly created CloudFront distribution.\n  After creating CloudFront distribution, manually add Route53 ALIAS record pointing to your\n  CloudFront domain name.\n* First deployment may be quite long (e.g. 10 min) as Serverless is waiting for\n  CloudFormation to deploy CloudFront distribution.\n\n\n```yaml\n# add to your serverless.yml\n\nplugins:\n  - '@animus-bi/fs-sls'\n\ncustom:\n  fs-sls:\n    domain: my-custom-domain.com\n    certificate: arn:aws:acm:us-east-1:...     # The ARN for the SSL cert to use form AWS CertificateManager\n    bucketName: webapp-deploy                  # Unique name for the S3 bucket to host the client assets\n    omitBucketPrefix: false                    # If 'true', will not prefix bucketName with `${self:service}-${self:provider.stage}-`\n    distributionFolder: client/dist            # Path to the client assets to be uploaded to S3\n    indexDocument: index.html                  # The index document to use\n    errorDocument: error.html                  # The error document to use\n    singlePageApp: false                       # If true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    invalidationPaths:                         # Custom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n      - /index.html\n      - /error.html\n    compressWebContent: true                   # Use compression when serving web content\n    apiPath: api                               # The path prefix for your API Gateway lambdas. The path for the lambda http event trigger needs to start with this too eg. api/myMethod\n    originPath: /${self:provider.stage}         # The origin path attached to the CloudFront <-> API Gateway reverse proxy\n    apiGatewayRestApiId: a12bc34df5            # If \"Api Gateway Rest Api\" is not part of the same serverless template, you can set your API id here \n    clientCommand: gulp dist                   # Command to generate the client assets. Defaults to doing nothing\n    clientSrcPath: client                      # The path to where you want to run the clientCommand\n    waf: 00000000-0000-0000-0000-000000000000  # ID of the Web Application Firewall. Defaults to not used\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    minimumProtocolVersion: TLSv1.2_2018\n    priceClass: PriceClass_100\n    noConfirm: false                           # Alternative to --no-confirm flag. Use this parameter if you do not want a confirmation prompt to interrupt automated builds.\n```\n\n\n**Second**, Create a website folder in the root directory of your Serverless project. This is where your distribution-ready website should live. By default the plugin expects the files to live in a folder called `client/dist`. But this is configurable with the `distributionFolder` option (see the [Configuration Parameters](#configuration-parameters) below).\n\nThe plugin uploads the entire `distributionFolder` to S3 and configures the bucket to host the website and make it publicly available, also setting other options based the [Configuration Parameters](#configuration-parameters) specified in `serverless.yml`.\n\nTo test the plugin initially you can copy/run the following commands in the root directory of your Serverless project to get a quick sample website for deployment:\n\n```bash\nmkdir -p client/dist\ntouch client/dist/index.html\ntouch client/dist/error.html\necho \"Go Serverless\" >> client/dist/index.html\necho \"error page\" >> client/dist/error.html\n```\n\n**Third**, run the plugin (this can take several minutes the first time), and visit your new website!\n\n```bash\nserverless deploy [--no-delete-contents] [--no-generate-client]\n```\n\nThe plugin should output the location of your newly deployed static site to the console.\n\n**Note:** *See [Command-line Parameters](#command-line-parameters) for details on command above*\n\n**WARNING:** The plugin will overwrite any data you have in the bucket name you set above if it already exists.\n\nTo just generate and deploy your client code:\n\n```bash\nserverless client deploy [--no-delete-contents] [--no-generate-client]\n```\n\nIf later on you want to take down the website you can use:\n\n```bash\nserverless client remove\n```\n\n### Configuration Parameters\n\n**bucketName**\n\n_required_\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    bucketName: [unique-s3-bucketname]\n    ...\n```\n\nUse this parameter to specify a unique name for the S3 bucket that your files will be uploaded to.\n\n---\n\n**omitBucketPrefix**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    omitBucketPrefix: false\n    ...\n```\n\nSet this parameter to `true` to create an S3 bucket that precisely matches `bucketName` without the {service}-{stage} prefix\n\n---\n\n**distributionFolder**\n\n_optional_, default: `client/dist`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    distributionFolder: [path/to/files]\n    ...\n```\n\nUse this parameter to specify the path that contains your website files to be uploaded. This path is relative to the path that your `serverless.yaml` configuration files resides in.\n\n---\n\n**apiPath**\n\n_optional_, default: `api`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    apiPath: api\n    ...\n```\n\nUse this parameter to specify the path prefix your API Gateway methods will be available through on your CloudFront distribution (custom domain)\n\n* If `http` events are defined, `apiPath` must be included in the path for the lambdas you want exposed through CloudFront (your custom domain). Not all your methods need to be exposed through CloudFront. For some things, esp. those that are not public facing (eg. third party web hooks) you may want to use the ApiGateway URL and not expose them through CloudFront to control access and cost.\n\n```yaml\nfunctions:\n  message:\n    handler: message.handler\n    timeout: 30\n    events:\n      - http:\n        path: ${self:custom.fullstack.apiPath}/message\n        method: post\n        integration: lambda\n```\n---\n\n**originPath**\n\n_optional_, default: `/${self:provider.stage}`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    originPath: /customOriginPath\n    ...\n```\n\nUse this parameter to specify the origin path that CloudFront will use to reverse proxy requests to API Gateway.\n\n---\n\n**apiGatewayRestApiId**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    apiGatewayRestApiId: a12bc34df5\n    ...\n```\n\nThis is only needed if \"Api Gateway Rest Api\" is not part of the same serverless template and the API id is not defined in [provider -> apiGateway](https://serverless.com/framework/docs/providers/aws/events/apigateway/#share-api-gateway-and-api-resources) section.\nThe id can be found in API Gateway url. For example, if your Rest API url is `https://a12bc34df5.execute-api.eu-central-1.amazonaws.com`, API id will be `a12bc34df5`. \n\n---\n\n**certificate**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    certificate: arn:aws:acm:us-east-1:...\n    ...\n```\n\nUse this parameter to specify ARN for the SSL cert to use form AWS CertificateManager\n\n---\n\n**indexDocument**\n\n_optional_, default: `index.html`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    indexDocument: [file-name.ext]\n    ...\n```\n\nThe name of your index document inside your `distributionFolder`. This is the file that will be served to a client visiting the base URL for your website.\n\n---\n\n**domain**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    domain: my-custom-domain.com\n    ...\n```\n\n`domain` can be a list, if you want to add more domains:\n```yaml\ncustom:\n  fs-sls:\n    ...\n    domain:\n    - my-custom-domain.com\n    - secondary-custom-domain.com\n    ...\n```\n\nThe custom domain for your fullstack serverless app.\n\n---\n\n**errorDocument**\n\n_optional_, default: `error.html`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    errorDocument: [file-name.ext]\n    ...\n```\n\nThe name of your error document inside your `distributionFolder`. This is the file that will be served to a client if their initial request returns an error (e.g. 404). For an SPA, you may want to set this to the same document specified in `indexDocument` so that all requests are redirected to your index document and routing can be handled on the client side by your SPA.\n\n---\n\n**objectHeaders** \n\n_optional_, no default\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    objectHeaders:\n      ALL_OBJECTS:\n        - name: header-name\n          value: header-value\n        ...\n      specific-directory/:\n        - name: header-name\n          value: header-value\n        ...\n      specific-file.ext:\n        - name: header-name\n          value: header-value\n        ...\n      ... # more file- or folder-specific rules\n    ...\n```\n\nUse the `objectHeaders` option to set HTTP response headers be sent to clients requesting uploaded files from your website. \n\nHeaders may be specified globally for all files in the bucket by adding a `name`, `value` pair to the `ALL_OBJECTS` property of the `objectHeaders` option. They may also be specified for specific folders or files within your site by specifying properties with names like `specific-directory/` (trailing slash required to indicate folder) or `specific-file.ext`, where the folder and/or file paths are relative to `distributionFolder`. \n\nHeaders with more specificity will take precedence over more general ones. For instance, if 'Cache-Control' was set to 'max-age=100' in `ALL_OBJECTS` and to 'max-age=500' in `my/folder/`, the files in `my/folder/` would get a header of 'Cache-Control: max-age=500'.\n\n---\n\n**singlePageApp**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    singlePageApp: true\n    ...\n```\n\nIf true 403 errors will be rerouted (missing assets) to your root index document to support single page apps like React and Angular where the js framework handles routing\n    \n---\n\n**invalidationPaths**\n\n_optional_, default: `['/*']`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    invalidationPaths:\n      - /index.html\n      - /error.html\n    ...\n```\n\nCustom invalidationPaths for cloudfront in case your frontend framework uses filename hashing\n    \n---\n\n**compressWebContent**\n\n_optional_, default: `true`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    compressWebContent: true\n    ...\n```\n\nInstruct CloudFront to use compression when serving web content, see [Serving Compressed Files](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html) in the Amazon CloudFront Developer Guide.\n    \n---\n\n**clientCommand**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    clientCommand: [command to generate your client (e.g. gulp dist)]\n    ...\n```\n\nCommand to generate the client assets. Defaults to doing nothing\n       \n---\n\n**clientSrcPath**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    clientSrcPath: [path/to/your/client]\n    ...\n```\n\nThe path to where you want to run the `clientCommand`    \n       \n---\n\n**waf**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    waf: [web application firewall ARN]\n    ...\n```\n\n[Web Application Firewall](https://aws.amazon.com/waf/) support - enable AWS WAF to protect your API from security threats\n         \n---\n\n**logging**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    logging:\n      bucket: my-bucket.s3.amazonaws.com\n      prefix: my-prefix\n    ...\n```\n\nReal world [access log](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html) - out of the box, API Gateway currently does not provide any kind of real \"apache-like\" access logs for your invocations\n         \n---\n\n**priceClass**\n\n_optional_, default: `PriceClass_All`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    priceClass: PriceClass_100\n    ...\n```\n\nCloudFront [PriceClass](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PriceClass.html) - can be PriceClass_All (default), PriceClass_100 or PriceClass_200\n\n---\n\n**minimumProtocolVersion**\n\n_optional_, default: `TLSv1`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    minimumProtocolVersion: TLSv1.2_2018\n    ...\n```\n\nSet minimum SSL/TLS [protocol version](https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_ViewerCertificate.html#cloudfront-Type-ViewerCertificate-MinimumProtocolVersion) - `TLSv1_2016`, `TLSv1.1_2016`, `TLSv1.2_2018` or `SSLv3`\n\n- The minimum SSL/TLS protocol that CloudFront uses to communicate with viewers\n- The cipher that CloudFront uses to encrypt the content that it returns to viewers\n\n---\n\n**noConfirm**\n\n_optional_, default: `false`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    noConfirm: true\n    ...\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds. If either this or `--no-confirm` CLI parameter is true the confirmation prompt will be disabled. \n\n---\n\n**origins**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    origins:\n      - Id: Media\n        DomainName: \n          Fn::GetAtt:\n            - MediaBucket\n            - DomainName\n        S3OriginConfig:\n          OriginAccessIdentity:\n            Fn::Join:\n              - ''\n              - - origin-access-identity/cloudfront/\n                - { Ref: S3OriginAccessIdentity }\n    ...\n```\n\nUse this parameter if you want to add additional origins to the CloudFormation resources.\n\n---\n\n**defaultCacheBehavior**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    defaultCacheBehavior:\n      MinTTL: 3600\n    ...\n```\n\n---\n\n**cacheBehaviors**\n\n_optional_, default: `not set`\n\n```yaml\ncustom:\n  fs-sls:\n    ...\n    cacheBehaviors:\n      - TargetOriginId: Media\n        PathPattern: media/*\n        AllowedMethods:\n          - GET\n          - HEAD\n          - OPTIONS\n        CachedMethods:\n          - HEAD\n          - GET\n        ForwardedValues:\n          QueryString: true\n          Headers:\n            - Accept\n            - Referer\n            - Authorization\n            - Content-Type\n        ViewerProtocolPolicy: redirect-to-https\n        ...\n    ...\n```\n\nUse this parameter if you want to add additional cache behaviors to the CloudFormation resources.\n\n---\n\n### Command-line Parameters\n\n\n**--no-delete-contents**\n\n_optional_, default `false` (deletes contents by default)\n\n```bash\nserverless client deploy --no-delete-contents\n```\n\nUse this parameter if you do not want to delete the contents of your bucket before deployment. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-generate-client**\n\n_optional_, default `false` (generates client code by default if `clientCommand` and `clientSrcPath` are configured)\n\n```bash\nserverless client deploy --no-generate-client\n```\n\nUse this parameter if you do not want to generate the client code before deploying. Files uploaded during deployment will still replace any corresponding files already in your bucket.\n\n---\n\n**--no-client-deploy**\n\n_optional_, default `false` (deploys the generated client code by default)\n\n```bash\nserverless deploy --no-client-deploy\n```\n\nUse this parameter if you do not want to deploy the client along with the rest of the serverless stack. Almost certainly in this case you don't want to generate the client code either and will want to use \n```bash\nserverless deploy --no-generate-client --no-client-deploy\n```\n\n---\n\n**--no-confirm**\n\n_optional_, default `false` (disables confirmation prompt)\n\n```bash\nserverless client deploy --no-confirm\n```\n\nUse this parameter if you do not want a confirmation prompt to interrupt automated builds.\n\n---\n\n**--no-invalidate-distribution**\n\n_optional_, default `false` (disables creating an invalidation for the CloudFront distribution)\n\n```bash\nserverless client deploy --no-invalidate-distribution\n```\n\nUse this parameter if you do not want to invalidate the CloudFront distribution. Invalidations are  for the path `/*`.\n\n---\n\n## Maintainers\n- Jeremy Wells - [jeremymwells](https://github.com/jeremymwells)\n\n## Contributors\n- everyone from fullstack-serverless\n\n## Credits\nForked from the [**fullstack-serverless**](https://github.com/MadSkills-io/fullstack-serverless)\n","readmeFilename":"README.md"}