OIDC Logout With AWS Cognito and Spring Security

With one of the previous blog posts, we configured a Thymeleaf Spring Boot application for an OAuth 2 Login with Spring Security and AWS Cognito. While this article focussed on the setup and login mechanism, the logout functionality was only half-way implemented. Our end-users are still logged in at the identity provider. Let’s adjust the

Read More

Java AWS Lambda Container Image Support (Complete Guide)

My original plan was to demo the container image support of AWS Lambda with a Java example that uses Selenium to scrape web pages. For Python and Node.js, there are a lot of examples available on the internet. I failed to get Chrome running for a Java AWS Lambda function with a custom Docker image.

Read More

Thymeleaf OAuth2 Login with Spring Security and AWS Cognito

Securing your frontend application with a login and managing a user pool is something you can either write for yourself or use an external identity provider for. If you want to move fast with your prototype you usually pick the second option and search for an OpenID Connect (OIDC) and OAuth2 compliant identity provider. AWS

Read More

Java AWS Lambda Example with Serverless and Maven

With this blog post, you’ll learn how to use the Serverless framework to develop AWS Lambda functions using Java and Maven. To provide you with a realistic use case, we’ll develop an AWS Lambda that will generate a thumbnail for each new image that we upload to an S3 bucket. AWS Account Setup for Serverless

Read More

Test Spring Applications Using AWS With Testcontainers and LocalStack

If your Spring application uses AWS components like S3, SNS, or SQS you might wonder how to write effective integration tests. Should I mock the entire interaction with AWS? Should I duplicate the AWS infrastructure for testing? Is there maybe a local AWS clone available? With this blog post, you’ll learn how to write integration

Read More

Resolving Spring Boot Properties Using the AWS Parameter Store (SSM)

If you are familiar with the AWS services landscape, you might already know the Parameter Store (part of the AWS System Manager, in short, SSM). This service allows us to store parameters for our application as a String, StringList or SecureString (encrypted using KMS keys). We can use this AWS service to configure both plain

Read More