Visiting JavaLand 2019

Last week I have attended JavaLand 2019 which was a great experience for me. Lots of different people, interesting talks and great speakers! It was my first time there and I have to admit: not only the usual conference content was great, but also the location was really unique – it’s located in Phantasia Land, an amusement park in Cologne, Germany.

I gained a lot of new ideas and thoughts which I want to share with you here. This is not a super-detailed summary of each talk, so don’t expect a complete lecture. Instead, I want to give you an idea of some talks, so you can dig deeper if you think it’s interesting for you. The reason is quite simple: Doing something on your own will bring the best learning experience. (smile)

Continue reading

Caching in AWS Lambda

 

Me presenting Caching in AWS Lambda

In every software application, there are usually two main reasons to cache data: a) to improve performance and b) to reduce costs. Caching in AWS Lambda is not different. Instead, the reasons for caching might be even more important in this context. This blog post explains why it could be necessary for you and shows how to implement different caching options. It’s based on a talk I gave at the AWS User Group Stuttgart meetup in December 2018. You can find the slides here and the code is provided in this GitHub repo.

Continue reading

Remove old CloudWatch log groups of Lambda functions

Remaining Old CloudWatch Log Groups of Lambda Functions

Remaining Old CloudWatch Log Groups of Lambda Functions

Do you recognize this view when looking into your CloudWatch log groups? Each AWS Lambda function has an associated CloudWatch log group. However, there is no cleanup process available as soon as a relationship between a CloudWatch log group and Lambda function expires. In that case it’s necessary to remove these old log groups manually. In this post I’ll show you an easy way to always have a clean set of CloudWatch log groups by automatically removing old log groups.

Continue reading

My first time on a bigger stage

On the 7th of September, I gave a talk at Atlas Camp 2018 in Barcelona. You can watch it here on YouTube. It was my first time on a bigger stage and about 80-100 people listened to my words – amazing! With this blog post I want to say thanks to all who helped me achieving this and share some lessons learned with you.

Continue reading

Shut down CloudFormation stack resources over night using AWS Lambda

A CloudFormation stack evolves over time and usually costs increase as well. You’ll probably not only have one stack, but instead have at least a production and a development stack. Even one development stack per developer might be common. This means the total costs increase even more. In order to prevent this, you might want to shut down CloudFormation stack resources over night to save costs. A neat way is to use AWS Lambda functions for this. You schedule them to execute after and before a regular working day to shut down or start up the stack resources. This blog post describes the steps to accomplish such a setup to decrease costs for developer stacks.

Continue reading

Creating Different Environments With AWS CloudFormation

Recently, a question on stackoverflow.com popped up which asked for different environments with AWS CloudFormation. Here, I want to present my answer and give some more information about this topic. The code for this blog post can be found in my GitHub repository where I also have some more CloudFormation examples.

Continue reading

Use Jersey and Spring in AWS Lambda

AWS Lambda is actually made to be used by implementing small functions which can be started quickly. So your code artifact should be as small as possible for a fast startup time. However, in the Java world there are nice frameworks like Jersey and Spring which can help you writing code for an API a lot! Unfortunately these frameworks can take up to a few MB and blow up your artifact, but you might have your reasons to use them in AWS Lambda, e.g. because you’re migrating an existing project to AWS Lambda. So let’s see, how you can use Jersey and Spring together in AWS Lambda! The code can be found in my GitHub repository lambda-jersey-spring-example.

Continue reading

How to reduce your CloudFormation template size

Recently, I came across a limit which I haven’t known before: CloudFormation just allows a maximum size of 51,200 bytes per template. If you have ever reached this limit, you might have encountered this error message:

[YOUR_TEMPLATE_CODE] at 'templateBody' failed to satisfy constraint: Member must have length less than or equal to 51200

So, what are the possible solutions to reduce a CloudFormation template size? In my opinion, there are two relatively easy solutions to overcome this problem: using a preprocessor and/or using AWS::Include.

Continue reading

Starter Projects For AWS Lambda Using NodeJS And Java

Today I want to show you three starter projects for AWS Lambda using CloudFormation and SAM – Serverless Application Model. I always like if I have some boilerplate code and can get started quickly without copying code or project structures from an existing (and mature) project. Therefore I thought it’s good to have them in one repository. You can find them on GitHub. The projects can be used for NodeJS and Java. Also one project contains both: usage of Java and NodeJS Lambdas in one CloudFormation template.

Continue reading