AWS Public Sector Blog
Microservices-based tax and labor systems using AWS
Introduction
In Modernizing tax systems with AWS, we briefly touched upon infrastructure and application modernization using microservices and serverless architectures. We hear from multiple tax and labor agencies about their desire to move to API-based architectures and adopt new technologies. In this post, we dive deeper into these areas and discuss benefits, approaches, and best practices for building modern tax and unemployment insurance (UI) applications using microservices. We also cover how microservices foster the API-first design patterns that can enable digital transformation and adoption of new technologies such as generative artificial intelligence (generative AI).
Many state systems, as shown in Figure 1, are N-tier monolithic applications that are typically deployed on virtualized infrastructure or legacy hardware. Monoliths group different system modules, components, and workflows in a way that creates a high coupling of technology but a low cohesion of business functionality. For example, tax revenue accounting and return processing modules would run on the same tightly coupled infrastructure despite minimal overlap in business and process functionality. This limits the ability to scale these functionalities independently. Updates or failure in one component can bring down the entire system, requiring full system upgrades even for a single functionality, longer maintenance cycles, and a larger scope that can impact multiple components. It’s also a challenge for monolithic applications to take advantage of modern technologies and tools such as AI, which heavily rely on the decoupling of data.
Microservices-based systems
Modern integrated systems break down distinct administrative functions and application modules into their own independent and decoupled infrastructure, called a microservice, as shown in Figure 2. Referring to our previous example, tax revenue accounting and return processing modules in a modern integrated tax system (ITS) would become small decoupled microservices interacting with each other through an API. The API completely abstracts the underlying infrastructure and can be scaled or upgraded independently.
Below are key benefits of a microservices architecture for integrated tax and UI systems:
- Scalability – Microservices allow the different components of the system to scale independently based on demand. This can help handle spikes in volume more effectively during high unemployment or increased usage during tax season.
- Flexibility – With microservices, changes and updates can be made to individual components without affecting the entire system, making it easier to adapt the system to new laws, regulations, or business requirements.
- Reliability – If one microservice fails, it does not bring down the entire system. This increases the overall reliability and fault tolerance of integrated platforms.
- Technology diversity – Microservices allow the use of different programming languages, frameworks, and technologies for each service based on their specific needs. This avoids being locked into a single technology stack.
- Easier maintenance – Smaller, focused microservices are generally simpler to understand, test, and maintain compared to a monolithic application. This can reduce the time and effort required for ongoing system upkeep.
- Faster development – The modular nature of microservices enables parallel development and deployment of different components. This can speed up the overall development lifecycle for new system features and capabilities.
- Improved user experience – By decoupling different functionalities, microservices architecture can enable a more seamless and responsive user experience for customers interacting with the integrated system.
- Serverless capabilities – Microservices can use serverless computing, where the underlying infrastructure is managed by the cloud provider. This can further improve scalability, reduce operational overhead, and allow the system to automatically scale up or down based on demand.
Improving efficiency through cloud-managed services
Transitioning to microservices can also reduce operations and maintenance through the use of managed services at Amazon Web Services (AWS). As seen in Figure 3, upgrading to modern solutions reduces customer management responsibilities. With an on-premises infrastructure, customers are responsible for every aspect of hosting the solution, including physical server management, software maintenance, capacity planning, and infrastructure provisioning. Cloud-managed services like Amazon Elastic Compute Cloud (Amazon EC2), Amazon Relational Database Service (Amazon RDS), and Amazon Elastic Container Service (Amazon ECS) allow customers to offload these requirements and focus on application scaling and data source integrations.
The optimal level of modernization would be to use all cloud-centered serverless services, such as AWS Lambda, where only application code requires customer management. Please note that the security and network configuration is based on the shared responsibility model between the customer and AWS. Ultimately, embracing serverless modern architecture on AWS cuts operational overhead via managed services, allowing customers to focus on innovation and business differentiation.
Serverless based tax and UI systems
Microservices-based applications also allow customers to build and integrate new modules or capabilities into the application via an API as shown in Figure 4. One way to build these new capabilities is by using serverless architecture. Serverless systems allow agencies to accelerate application modernization and maximize cloud benefits. With a serverless application architecture, you can utilize the same components of a traditional three-tier architecture but use event-driven architecture with microservices, APIs to communicate between services, and purpose-built data stores that fit each service.
API-based integration with AI and machine learning (ML)
If you are not yet ready to break down your monolithic applications into microservices, another pattern is to modernize by building new microservices as independent modules, such as AI or data lakes, and seamlessly integrating them into existing infrastructure or monolithic systems. AWS offers a suite of AI services that can be integrated into applications by building new APIs. Agencies can take advantage of AWS AI services such as Amazon Connect, Amazon Textract, Amazon Comprehend, and Amazon Q by utilizing API-based integrations. The following section covers some of these capabilities and how they can help agencies realize immediate gains in customer experience and operational efficiency.
Amazon Connect
Amazon Connect is an omnichannel cloud contact center across voice and chat that allows agencies to provide enhanced customer service at a low cost. As shown in Figure 5, with self-service tools such as natural language chatbots, interactive voice response, and skills-based agent routing, agencies can quickly set up and scale a modern contact center for both callers and agents. Automation and skills-based routing enable agent productivity and end customers can get the answers they need at the right time based on the agent’s skillset, past history, and availability.
Amazon Q
Amazon Q, a generative AI–driven assistant, is available within Amazon Connect and provides agent support and faster resolution for customers. Amazon Q automatically identifies customer concerns in real time, provides agents with context on the customer’s information, allows customers to resolve issues with internal knowledge search, and shares recommended responses and step-by-step solutions all on the same page. Using Amazon Q with Amazon Connect helps agents to address issues promptly and effectively.
Intelligent document processing (IDP)
Tax and labor agencies can integrate IDP using serverless and microservices architecture to streamline the document review process. Amazon Textract is an ML service that automatically extracts text, handwriting, and data from scanned or electronic documents. Amazon Comprehend is a natural language processing (NLP) service that provides pre-trained and custom APIs to derive insights from textual data. Together, these services can be used to classify and extract critical information from return attachments, W-2 forms, claims adjudication forms, and letters or emails. Agencies can also apply business rules and store this data in downstream systems.
Amazon Bedrock
Amazon Bedrock is a fully managed service that offers a choice of foundation models (FMs) through easy-to-use APIs. With Amazon Bedrock, customers can incorporate generative AI into their tax and labor systems. Bedrock enables capabilities such as content summarization for documents or call transcripts, natural language translation, or analyzing documents for inconsistencies using generative language models. Tax agencies, for example, can generate tax credit or deduction documentation for customers and create status report summaries. With Bedrock, tax and labor agencies can also build AI assistants to increase employee productivity and leverage Gen AI to review, classify, and summarize legal documents or bills.
Amazon SageMaker
Amazon SageMaker is an ML service that brings together a broad set of tools to build, train, and deploy ML models. With Amazon SageMaker, for example, customers can build risk-scoring ML models with APIs for fraud detection. In Figure 7, we combine multiple AI capabilities such as fraud risk scoring and IDP to build an end-to-end fraud detection and prevention workflow for UI claims. By combining these capabilities, agencies can identify noncompliant claims and anomalies, detect new and emerging patterns at scale, and reduce friction for legitimate claims.
The end-to-end fraud detection and prevention workflow for UI claims begins with a customer filing a UI claim. First, screening rules check for exceptions. If a rule is triggered, the claim is sent for review. Next, an ML model scores the claim for fraud risk, identifying high-risk claims in real time. The contents of claim documents are also extracted, indexed, and incorporated into the model. Finally, adjudicators receive a risk-ranked set of claims that require their review.
Conclusion
In summary, a microservices approach provides the flexibility, scalability, and reliability that are essential for modernizing and enhancing complex, mission-critical systems like an integrated tax or UI platform. With careful design and management, agencies can fully realize these advantages, improve business operations, and continue to innovate the customer experience. Learn more about the approaches to modernizing monolithic applications in the Implementing Microservices on AWS whitepaper.
Read more about AWS for tax and labor systems: