Now GmbH: Serverless e-charging stations subsidies platform
Customer
The „Nationale Organisation Wasserstoff- und Brennstoffzellentechnologie“ (NOW GmbH) is a research funding program company that coordinates funding programs in the field of sustainable mobility for the Federal Ministry of Transport and the Federal Ministry for the Environment. Furthermore NOW manages the Federal Government‘s National Hydrogen and Fuel Cell Technology Innovation Program and the Federal Ministry for Digital Affairs and Transport funding guidelines for electromobility and charging infrastructure.
Challenge
The rethinking of the federal government and the industry with regard to e-mobility has made the topics of energy and mobility transition extremely important and brought them into the public eye. For example, 194,000 purely electric vehicles were registered in Germany in 2020, which corresponds to an increase of 206 percent compared to 2019. However, many regions still lack the necessary infrastructure to meet the ever-increasing demand for e-charging stations.
This project should help to take a further step towards e-mobility by building an easy-to-use platform where applicants for subsidies for electronic charging stations could register, submit and complete their reporting on the funding applications fully digitally.
The first challenge was that the platform had to cope with a highly variable number of users. The reason for this is that with such applications, the users tend to come in waves (e.g., when certain user groups are activated or when the platform has gone live for the first time). Outside of these „waves“, a rather low volume of users is to be expected. Ideally, the platform adapts to this user behaviour, not only in terms of performance but also in terms of cost development.
Screenshot 1: A serverless AWS architecture with AWS Lambda, Amazon Aurora Serverless, and AWS Amplify, among others.
For users, the application process does not begin with the NOW GmbH platform but with the Kreditanstalt für Wiederaufbau (KfW). Only after the application has been processed at KfW users can log on to the platform and continue with the application. This poses the challenge that the initial data collected at KfW must be imported into the new platform system and should therefore be as simple and automated as possible.
The next challenge was that the platform should be easy and intuitive for everyone to use. In particular, users with little technical knowledge should be able to use the platform easily. This should minimise the number of support requests and eliminate unnecessary effort for users and operators. For this reason, the topic of design/UX/UI is to be set as a central building block in the project.
In order for the application data to be analyzed by NOW GmbH, it is necessary to be able to take snapshots of the database at any point in time. Of course it was the highest priority that all user-related data is anonymised before it is made available to the data analysts.
The last (implicit) challenge was to make the setup of the infrastructure in the cloud comprehensible, automatable and versionable. These points are essential for a successful cloud strategy and should form the basis for every project within the cloud.
Solution
PRODYNA‘s support started at the visioning stage, working with the Now team to align the capabilities of the AWS Cloud and the principles of modern architecture with the project goals.
Flexibility, scalability and a pay-as-you-go pricing model are the building blocks needed to support these project goals and are in the same time the definition points of the serverless principle. When you use serverless services, you no longer have to deal with server sizes, CPU or memory configurations. Serverless services scale automatically and you only pay for what you use. For these reasons, almost the entire architecture has been built serverless.
The entire backend consists of AWS Lambda functions. This allowed us to focus completely on our (Node.js) code during development and AWS Lambda took care of everything around it (scaling, high availability, etc.).
The REST API, which connects the backend to the frontend, was not implemented in code, as is often the case, but rather via the Amazon API Gateway. This allowed us to access the rich features (e.g. OpenAPI support, rate limits and easy integration with other AWS services) of the Amazon API Gateway in a simple and fast way, further decoupled the architecture and provided a highly available, scalable and secure serverless REST API.
Screenshot 2: Personal dashboard with an overview of all created reports and the possibility to create further reports.
Amazon Aurora MySQL in the serverless variant was used to store the application data. Amazon Aurora is the relational database service developed specifically for the cloud. It offers up to five times faster performance than a standard MySQL database, as well as important features such as automatic backups, creation of special read replicas and automatic disaster recovery. In the serverless variant, there is no need
to guess at server sizes because the database scales automatically. The serverless object store Amazon S3 was used to store files, like the KfW and the charging process data of the users.
The initial application data is provided via Excel files by the KfW. An Amazon S3 bucket was provided to store the Excel files in order to process them and upload them to the database. On this S3 bucket is a trigger that starts an AWS Lambda function every time a new Excel file is uploaded. This Lambda function reads the Excel file, processes it and writes the sanitised data to the database. This procedure allows a necessary media break to be almost completely automated.
In order to offer the users an interface that is as intuitive and accessible as possible, NOW GmbH worked closely with the frontend developers and designers right from the start of the project. PRODYNA has its own design department, which can ideally support the client in the realisation of his ideas.
The frontend itself was written with the state of the art technologies react, Typescript and Material-UI and can therefore convince not only in terms of UI/UX but also with performance.
In terms of user and authorisation management, we were also able to fall back on the complete solution of an AWS service, namely Amazon Cognito. Furthermore, it was possible to map standard frontend elements, such as the login mask, using ready-made and tried-and-tested modules.
A Lambda function was written to create the anonymised database snapshots. This function can read the data from the Amazon Aurora, anonymise it in-place and then write it to an Amazon S3 bucket. Here the snapshots can be used to import the data into another MySQL database. It does not matter whether this database is in the cloud, on-premises or on the local developer‘s computer.
Infrastructure as Code (IaC) is a solid basis for successful projects in the cloud. With IaC, infrastructure is written declaratively in scripts. This makes it possible to make infrastructure comprehensible, automatable and versionable. In this case, we used the very popular open source IaC tool Terraform. Terraform offers ideal possibilities to build not only AWS but also various other infrastructures (e.g. other cloud providers, Kubernetes, Cloudflare etc.) by code.
In addition to the frontend which had its own continuous integration and continuous delivery (CI/CD) pipeline through AWS Amplify, by using Terraform the entire infrastructure could also be automatically planned, checked and deployed through a CI/CD pipeline.
Screenshot 3: The report wizard for applying for subsidies for e-charging stations provides a step-by-step instruction and the possibility to save mass data visible in cards.
Screenshot 4: With the easy-to-use report wizard, subsidies can also be applied for via a mobile device.
The introduction of IaC has the further advantage that it is very easy to create multiple infrastructure environments, the so-called staging. So we could easily create three stages in total. One stage for active development (Develop Stage), one for testing and acceptance of features (QA Stage) and then of course the production stage.
Of course, security is also part of any good cloud architecture. The best practices defined by AWS were followed, such as the database not being directly accessible from the internet (only via a so-called bastion host) and only granting as many permissions as needed. Furthermore, the interfaces that are accessible from the internet are particularly well secured. For example, the API Gateway was protected against the most common attack vectors using the AWS Web Application Firewall (WAF). Authorization against the platform is provided by the industry standard OpenID Connect, via Amazon Cognito.
Even after going live, PRODYNA actively supported the Now team with new features and bug fixes thus, guaranteeing the continued high quality of the application.
Result
In a very short time, a complete platform was provided that took a decisive step towards the digitalisation of public authorities. The serverless architecture has made it possible for the environments to be operated extremely cost-effective but still with high availability and reliability. Constant readjustment of resources is no longer necessary, maintenance has been trivialised and the platform scales with its users.
By using experienced UX/UI designers and state of the art technologies in the frontend, the user experience was improved and made more intuitive. This can minimise support requests and user dissatisfaction.
Furthermore, with automatisms and the capabilities of the AWS Cloud, normally time-consuming and manual tasks, such as anonymising and importing external data, have become trivial tasks that can be done with „one click“.
Last but not least, by using IaC, NOW GmbH was able to map a complete development cycle of infrastructure and the application cleanly and thus reduce the potential for errors in changes.
Contact us
Contact us
To find out more, please do not hesitate to contact me.