Question: I am used to developing on IntelliJIdea, pushing to gitlab which makes an automatic build and pushes everything where it is needed. In the end I have a self-containing git repository which has all the code and even the scripts for building & deploying. If anything happens to my dev/prod server Ill get everything back in minutes. If I want another dev to help me out - I can just send him the git link. Everything he changes will be easily deployed on the dev server.

However I have no clue how achieve this kind of setup. Should I go for Eclipse with AWS plugin? But I really dont want to switch my favority IDE just to work with AWS. Maybe make scripts which will use aws-cli to upload/update all the lambdas/policies/etc? I would really appreciate any good practices listed.

Answer: 
If you have AWS Lambda functions, there is a great CLI tool called `autolambda`, see [here](https://www.npmjs.com/package/autolambda). It commits to git and publishes your changes to Lambda at the same time. Assuming you have git and the AWS CLI in set-up in your terminal. It uses some bash scripts in the backend.

You can get it from NPM
`npm install -g autolambda` 

Use it like this:

```
autolambda init --name myFunctions --desc "These functions are related"

cd myFunctions

```

To make an AWS Lambda function:

```
autolambda create --name HelloNode --runtime node --role "arn:aws:iam::abcdefghijk" --desc "Hello World Function in Node"

```

To publish any changes:

`autolambda publish --name HelloNode --desc "changed main.js text"`

I found it really useful. Cheers.
Please vote for implementing Intellij IDEA support for Amazon Lambda here:

<https://youtrack.jetbrains.com/issue/IDEA-180070>

Previously, we were limited to the AWS Toolkit for Eclipse if we wanted to perform local testing for Amazon Lambda functions, and build serverless applications in Amazon. 

But since Aug 11, 2017, Amazon provides the AWS SAM Local, a CLI tool that allows us to locally test and debug our AWS Lambda functions. SAM Local supports Lambda functions written in Node.js, Java, and Python.