This Guidance shows how to implement an accurate, resilient, serverless, and event-driven payroll processing system designed with one-time processing requirements and failure-handling patterns. If you have transactional requirements when writing data to your systems of record, you have likely used features inherent to your relational database system. However, when you move to an asynchronous model in the cloud, many of the approaches that your architects and developers have relied on might not be available. This Guidance addresses challenges with data consistency by providing a transactional, or 'saga,' pattern to handle rollbacks and compensating actions when failures occur during the multi-step payroll processing workflow.

Please note: [Disclaimer]

Architecture Diagram

[Architecture diagram description]

Download the architecture diagram PDF 

Well-Architected Pillars

The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.

The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.

  • Event-driven systems are asynchronous in nature and use decoupled microservices that can scale and fail independently. This Guidance is designed to handle planned and unplanned events. For example, EventBridge and API Gateway facilitate both scheduled requests for planning activities and one-time requests for unplanned activities. Additionally, the use of serverless services enables microservices to scale dynamically as the business scales. Amazon SQS, Lambda, DynamoDB, and Step Functions (which provide distributed map and lifecycle hooks) can scale while maintaining a durable orchestrated workflow. The system maintains idempotency, allowing repeated processing of the same operation without unintended side effects.

    Read the Operational Excellence whitepaper 
  • This Guidance uses multiple layers of security to protect data as it moves across systems and from public to private resources. It encrypts network traffic using TLS, and API Gateway uses authentication and authorization services to protect backend services from untrusted sources. Additionally, Shield provides DDoS protection, and AWS WAF provides conditional access policies that control access to protected content.

    Read the Security whitepaper 
  • In distributed systems, each service can scale independently based on variable incoming requests or events, but this can lead to unpredictable volumes of traffic at individual services because each component accepts, completes, and hands off work at a different rate. This Guidance uses Amazon SQS to decouple services within a distributed system and provide a durable queue, which buffers downstream services from spikes in volume until they are able to process the work. DynamoDB integrates and scales alongside serverless systems and provides system idempotency by tracking the state of work as it moves through the distributed system.

    Read the Reliability whitepaper 
  • This Guidance uses serverless services, removing the need for you to manually provision servers to handle peak volume. Serverless technologies like Step Functions, Amazon SQS, Lambda, EventBridge, and API Gateway scale alongside request volume, often within seconds, and efficiently scale up and down to protect your solution against the under- or overprovisioning of resources.

    Read the Performance Efficiency whitepaper 
  • Serverless technologies like Lambda, Amazon SQS, and API Gateway use a pay-for-use billing model, and they elastically scale resources up and down alongside events. This removes the operational overhead of capacity management and patching and optimizes resource allocation to match the load. EventBridge and Lambda also enable an event-driven architecture that removes the need to keep resources continuously allocated to poll or track work as it passes between services. Additionally, event-driven components are loosely coupled, promoting greater flexibility and extensibility of applications and thereby improving your developers’ operational efficiency.

    Read the Cost Optimization whitepaper 
  • Step Functions, Amazon SQS, Lambda, EventBridge, API Gateway, and DynamoDB dynamically scale alongside requests for optimal provisioning based on workload volume. As a result, you don’t need to overprovision services to meet peak demand. Backed by loosely coupled microservices that scale independently, this event-driven system can allocate resources to the specific service that needs to process the event. Additionally, the AWS US East and West Regions use 100 percent renewable energy to power their compute resources.

    Read the Sustainability whitepaper 
[Content Type]

[Title]

This [blog post/e-book/Guidance/sample code] demonstrates how [insert short description].

Disclaimer

The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.

References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.

Was this page helpful?