Are AWS Templates Viable for Projects? IoT Core for EV Charger Review

Nic Lasdoce
02 Jun 20245 minutes read

We tested AWS IoT Core’s OCPP-compliant template for EV charging management. Curious to see if AWS templates can handle real-world projects? Our review uncovers the benefits, challenges, and overall viability of using AWS’s solutions in production. Read on to find out!

Introduction

When considering AWS for different projects, many wonder if the templates they provide will actually fit real-world scenarios and how easy they are to implement. In our case, we found and tried this OCPP architecture. Keep reading to discover our findings, highlighting the benefits, challenges, and overall viability of AWS's sample templates in a production environment.

Overview

Here is an overview of the solution based on how we used it in this project.

  • A charger connects to the infrastructure through the Network Load Balancer (NLB).
  • The NLB distributes traffic to ECS Fargate tasks, which run the OCPP Gateway and maintain connections via WebSockets.
  • ECS Fargate tasks automatically scale in or out to handle fluctuating traffic volumes.
  • When a charger connects to the Gateway in Fargate, it establishes an MQTT connection to AWS IoT Core using a unique ID as the Thing ID.
  • Messages to and from chargers are managed using IoT Rules, utilizing SQL statements to filter specific message types and route them based on business logic.
  • Amazon SQS acts as a buffer for critical IoT Rules to ensure no messages are lost.
  • AWS Lambda functions handle business logic, such as sending webhooks to subscribed APIs for further processing.

Why IoT Core?

AWS IoT Core enables seamless connectivity for billions of devices, routing trillions of messages with minimal infrastructure management. By leveraging services like Amazon ECS, AWS Lambda, and Network Load Balancer, we deployed a scalable, low-latency charge point operator system. This setup ensured that our charging points (CPs) remained connected and functional, with automatic scaling to meet demand fluctuations.

Key Features and Benefits

Scalability and Elasticity

One of the significant advantages of using AWS IoT Core is its scalability. With AWS Fargate, our infrastructure could automatically scale, eliminating the need for manual resource management. This means that whether we were managing a few charging points or thousands, AWS handled the load efficiently.

Real-time Monitoring

Real-time data is crucial for managing EV charging stations. AWS IoT Core utilizes the MQTT protocol to maintain a constant flow of data between CPs and the central management system. This ensured that we could monitor and manage our charging network in real-time, identifying and addressing issues promptly.

OCPP Compliance

The Open Charge Point Protocol (OCPP) is a standardized protocol for communication between charging stations and the central management system. AWS IoT Core ensured compliance with OCPP, facilitating seamless integration and operation of diverse CP models. This compatibility was essential for maintaining interoperability and scalability as our network grew.

Security and Reliability

AWS provides a robust security framework that ensured data integrity and secure communications across our network. With features like encryption, access controls, and continuous monitoring, we trusted that our data and operations were secure.

Implementation Insights

Deploying the OCPP Gateway on AWS involved setting up an OCPP WebSocket endpoint, which acted as a proxy between OCPP and MQTT. This architecture allowed us to manage our fleet of CPs effectively, ensuring each unit's performance and compliance with operational standards.

Architecture Highlights:

  • OCPP Gateway: Deployed on Amazon ECS with auto-scaling capabilities.
  • Network Load Balancer: Provided a stable endpoint for CP connections, ensuring reliability and low latency.
  • AWS IoT Core: Managed device communications and message routing with high elasticity.
  • AWS SQS: Utilized to buffer incoming data, ensuring the system could handle scaling to many chargers and manage spikes in data traffic effectively.

Deployment Process

The process of deploying the OCPP-compliant EV charge point operator solution using AWS IoT Core was streamlined with the use of AWS Cloud Development Kit (CDK). AWS CDK provided infrastructure as code, allowing us to define our cloud infrastructure using familiar programming languages. This approach not only simplified the deployment process but also ensured that our infrastructure was scalable, repeatable, and easy to manage.

Overcoming Common Challenges

During the deployment process using AWS CDK, one error occurred related to the architecture setting. This was easily resolved by modifying

bin/aws-ocpp-gateway.ts
to include
architecture: 'X86_64'
, accommodating the Linux environment on an X86_64 Intel CPU.

Initial Setup Complexity

Worried about initial setup complexity? AWS provided a detailed guide and infrastructure-as-code (IaC) tools via AWS CDK, simplifying the deployment process. The comprehensive documentation and community support made it easier to get started and overcome any initial hurdles.

Scalability Concerns

Concerned about scalability? The solution automatically adjusted to handle an increasing number of CPs, ensuring consistent performance without manual intervention. AWS's auto-scaling features ensured that our infrastructure could grow with our needs, providing a reliable and scalable solution.

Security Issues

Security concerns? AWS's comprehensive security measures ensured data protection and secure communication channels. With features like encryption, access controls, and continuous monitoring, we were confident that our data and operations were secure.

Testing the Infrastructure

Testing the infrastructure proved to be straightforward and efficient. Several aspects contributed to this:

  1. Mock Client Script: AWS provided a mock client script for testing, which simplified the process of verifying the setup and ensuring that all components functioned correctly.
  2. Customizing IoT Rules: It was straightforward to customize the IoT rules and create new ones tailored to specific requirements, enhancing the flexibility and functionality of the system.
  3. Creating DynamoDB Tables: Setting up a new DynamoDB table for historical heartbeat data was relatively easy by using an IoT rule to route the data to the new table.
  4. Data Fetching: Fetching data by DeviceID and timestamp was also easily accomplished, providing robust data management and retrieval capabilities.

Real-world Benefits

Implementing AWS IoT Core for EV charging management translated to tangible benefits. We were able to reduce operational costs and improve service reliability. The automatic scaling feature ensured that our infrastructure could handle peak loads without degradation in performance. Real-time monitoring and alerts provided proactive maintenance, reducing downtime and enhancing customer satisfaction.

Moreover, the security framework provided by AWS helped in protecting sensitive data and maintaining compliance with regulatory standards. AWS IoT Core's flexibility allowed easy integration with other AWS services, enabling a holistic approach to managing IoT devices and applications.

Conclusion

Our experience with AWS IoT Core for EV charging management has demonstrated that AWS’s sample templates are indeed viable for real-world projects. They offer a robust, scalable, and secure solution that can be easily implemented and customized to meet specific needs. AWS IoT Core provided us with the tools necessary to enhance our operational efficiency, reduce management overhead, and ensure seamless scalability. Overall, the benefits outweighed the challenges, proving the templates to be a practical choice for production environments.

Bonus

If you are a founder needing help in your Software Architecture or Cloud Infrastructure, we do free assessment and we will tell you if we can do it or not! Feel free to contact us at any of the following:
Social
Contact

Email: nic@triglon.tech

Drop a Message

Tags:
AWS

Nic Lasdoce

Software Architect

Unmasking Challenges, Architecting Solutions, Deploying Results

Member since Mar 15, 2021

Tech Hub

Unleash Your Tech Potential: Explore Our Cutting-Edge Guides!

Stay ahead of the curve with our cutting-edge tech guides, providing expert insights and knowledge to empower your tech journey.

View All
8 AWS Services That Will Help You Better Use AWS
10 Jun 20244 minutes read
Monolith: From Zero to Millions
14 May 20244 minutes read
View All

Get The Right Job For You

Subscribe to get updated on latest and relevant career opportunities