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

Different users of the same service name will delete each other's function #5975

Open
kog-7 opened this issue Mar 29, 2019 · 4 comments
Open

Comments

@kog-7
Copy link

kog-7 commented Mar 29, 2019

Multiple developers in same service name deploy

Description

  • Multiple developers in same service name (same serverless template) to write functions, But they don't know what function other people have,if one developer use sls deploy,he will delete the functions which other developers create. How can i use sls deploy only append my functions ?

thanks

@garethmcc
Copy link
Contributor

I would recommend using stage. This can then also be used to make sure you don't make changes to other infrastucture another developer may be testing with. With every resource you create add ${opt:stage} somewhere in the name. For example, I tend to name DynamoDB tables as ${self:service.name}-tableName-${opt:stage}

Then when I deploy I just add --stage to the cli command. If I want to do it just for me I use my name:

sls deploy --stage garethmcc-testing

Now I can't overwrite anyone else's functions or resources if setup correctly.

@kog-7
Copy link
Author

kog-7 commented Apr 16, 2019

@garethmcc hi, garethmcc ,thanks very much for your help,but our lambda application ,They were developed by each individual, and maybe we have A few hundred points function,we want to put some functions into one application , but everyone deployed and developed independently,each lambda have each business name ,It's not reasonable for them to use stages,and aslo same application name is will delete others lambda function. so we now deploy each function with each application. But I don't think it's good

@mikezange
Copy link

I think this is more of a limitation of AWS rather than the serverless framework its self due to the way cloud formation works.

What you could do, is move all the functions into a single repo with a single serverless.yml file and distribute that to all users and share the repo between all users.

@moosabaloch
Copy link

I don't know if I am right, You should use CI/CD pipelines to deploy your code, implementation of Jenkins,
Travis like tools may play a good role here.

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

5 participants