AWS Lambda, Cold Start and Java Optimizations
  [draft]

In one of my recent project I got an opportunity to work on a Java based Lambda function. Here I am sharing few tips to reduce the cost and solution to the common AWS Lambda problems like Cold start. Keep them warm! Use provisioned concurrency – AWS feature. Use Periodic ping e.g., health checks! Load as much as you can/need during runtime bootstrap since you get boosted CPU access during that time but mind the 10 second limit Keep JAR size as small as possible, avoid including unnecessary jars and classes....

1 min · Chetan Gole

Change Current Java Version in Windows 10 in one click - using a batch file
  [draft]

In the world of microservices, we work on different versions of Java in different microservices. It takes some effort to open the Windows configuration screen to change the Java version and run your builds. Manually doing it once in a while is ok, but what if you want to do it when you have a production defect in hand? I found an opportunity to automate this. So I created this simple batch file to change the Java version with one click....

1 min · Chetan Gole

Cost Effective Test Automation for AWS Lambda based Serverless Projects
  [draft]

You can invoke your Lambda function locally by using the sam local invoke command and providing its function logical ID and an event file. We have built a framework using AWS SAM SDK and Pytest to test our Lambda functions before every production deployment. The tests are run inside the Jenkins server itself. No dependency on real AWS account. Read more here: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-using-invoke.html I’ll update the post with more information very soon....

1 min · Chetan Gole

How Datadog Agent Works
  [draft]

I am sure, you must be aware of Datadog. Datadog is infrastructure monitoring as a service. Read more here: datadog.com Ever wondered how Datadog agent works? We use Datadog in SAS CI360 to monitor our infrastructure. It provides quite a lot of features like APN, distributed tracing, etc. But, how Datadog knows all the information about your service without adding any code to our microservices? We need to include a Datadog agent in our JVM startup....

2 min · Chetan Gole

Points to consider when using AWS Lambda
  [draft]

Cold Start AWS Lambda: Burst Limitations – concurrency. Time, Memory and CPU limitations Only time and memory is configurable. AWS Allocates other resources like CPU, networking throughput based on selected memory configuration. Temp storage limitations – 512 MB (If need be, we can mount AWS Elastic File System) Not recommended to use libraries like Spring, Hibernate, etc. No APIs for IoC, Localization, interaction with shared services, and so on....

1 min · Chetan Gole

To be, or not to be: Code Comments
  [draft]

I believe in writing code such a way that, you don’t need to provide the documentation with your source code to understand how it works. Naming the functions, variables and even logs can help understand the source code flow instead of writing long confusing comments. However sometimes the comments also help. There are a lot of good discussions around whether we should add comments in our code or not. Please go through below links to read more:...

1 min · Chetan Gole