Skip to content

Add possibility for to exclude not needed files from deployment package #308

@Jacksotnik

Description

@Jacksotnik

Hello here is my project structure:

-AppName
    -Common
        -common.js //Global module which i'm using in all functions
    -Func1
        -index.js
    -Func2
        -index.js
    -template.yaml

And here is template.yaml content:

AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Serverless Specification template describing your function.
Resources:
      Func1:
        Type: 'AWS::Serverless::Function'
        Properties:
          Handler: Func1/index.handler
          Runtime: nodejs6.10
          MemorySize: 512
          Timeout: 10
      Func2:
        Type: 'AWS::Serverless::Function'
        Properties:
          Handler: Func2/index.handler
          Runtime: nodejs6.10
          MemorySize: 512
          Timeout: 10

When i deploy for example Func2, result package contain all folders inside application, instead only Func2. Is it possible to configure through yaml file, what files will included in result package?
For example if i deploy Func2 i want to see in package next:

-Common
    -common.js
-Func2
    -index.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions