Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging: Support customization of source directory #7920

Open
tamsler opened this issue Jul 7, 2020 · 3 comments
Open

Packaging: Support customization of source directory #7920

tamsler opened this issue Jul 7, 2020 · 3 comments

Comments

@tamsler
Copy link

tamsler commented Jul 7, 2020

Use case description

The serverless.yml package section should allow to define a codeUri which will be use as the base path for generating the zip archive.

e.g. Code
src/handler/index.js
src/lib/service.js

serverless.yml
package:
codeUri: ./src

this would generate a zip archive containing:
handler/index.js
lib/service.js

Proposed solution

e.g. Sample Code
src/handler/index.js
src/lib/service.js

serverless.yml
package:
codeUri: ./src

this would generate a zip archive containing:
handler/index.js
lib/service.js

This would be a similar capability that AWS SAM offers via: CodeUri: ./src
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html

@medikoo
Copy link
Contributor

medikoo commented Jul 8, 2020

@tamsler thanks for proposal. I would probably name it as package.sourceDir, and support it in both top level package setting and individual function setting (which could be used if package.individually is turned on).

Note that we also plan to improve packaging (#6580) so only modules used by lambda are packaged, and that will naturally address your use case.

@heetu
Copy link

heetu commented Nov 12, 2020

Guys, Any Update?

@medikoo medikoo changed the title serverless.yml package should allow to define codeUri Packaging: Support customizaton of source path Nov 12, 2020
@medikoo
Copy link
Contributor

medikoo commented Nov 12, 2020

@heetu PR that brings this feature in is welcome!

@medikoo medikoo changed the title Packaging: Support customizaton of source path Packaging: Support customization of source path Apr 15, 2021
@medikoo medikoo changed the title Packaging: Support customization of source path Packaging: Support customization of source directory Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants