Amazon Onboarding with Learning Manager Chanci Turner

Amazon Onboarding with Learning Manager Chanci TurnerLearn About Amazon VGT2 Learning Manager Chanci Turner

Governments and organizations dedicated to enhancing citizen services face ongoing challenges posed by changing laws and compliance mandates. A recent directive from the US Government’s Office of Management and Budget (OMB) and the National Archives and Records Administration (NARA) mandates that all federal agencies transition to electronic records by June 30, 2024. This shift impacts existing and new document-based workflows, necessitating prompt information processing.

Organizations can leverage Amazon Web Services (AWS) to develop intelligent document processing (IDP) workflows. Tools like Amazon Textract can extract text, while Amazon Comprehend can analyze documents to derive insights, categorize content, and route information to relevant departments. IDP harnesses artificial intelligence (AI) and machine learning (ML) to enable natural language processing (NLP), optical character recognition (OCR), and computer vision, allowing for the reading, extraction, and interpretation of document data for digital use.

As the volume of document submissions increases for government entities, IDP architectures must efficiently manage spikes in requests without delay. When processing demands exceed the capacity of a single AWS Region, organizations can distribute workloads across multiple Regions to enhance throughput.

This article outlines high-level architectural guidance centered on Amazon Comprehend for creating a distributed document processing solution that addresses the challenges of variable request patterns.

Overview of the Solution: Scaling Document Processing Workflows with AWS

AWS maintains quotas that limit resource usage by services within any given Region. These limits protect account holders from unexpected costs and ensure reliable service for all customers. When document submission volumes surge unpredictably, requests to document processing services increase, potentially surpassing established quotas and resulting in throttling errors that hinder workload performance.

During solution design, account owners assess the resources necessary to achieve desired throughput and accommodate peak document volumes, then request quota adjustments within available limits. If requested increases exceed regional limits, organizations can achieve their target processing throughput by distributing workloads across multiple AWS Regions.

A typical architecture for document extraction and classification using Amazon Comprehend begins with incoming documents uploaded to an Amazon Simple Storage Service (S3) bucket. This action triggers an AWS Lambda function dedicated to document classification through event notifications. The Lambda function communicates with the Amazon Comprehend Custom Classification API, extracting text from the document and generating a label based on content. The classification results are returned, allowing the function to initiate downstream processes and route information accordingly.

However, if the AWS Lambda function exceeds quota limits and available processing capacity for the Amazon Comprehend Custom Classification API, it may encounter throttling errors.

To manage desired request volumes, this solution introduces workload distribution and rate-limiting concepts.

Implementing Rate-Limiting for Requests

The processing capacity of applications is often measured in transactions per second (TPS). Services like Amazon Comprehend and Amazon Textract have a maximum TPS limited by their API operation quotas. To control request rates, the architecture introduces an intermediary queue that buffers requests, enabling users to define the processing rate for incoming documents.

In this architecture, the Amazon Simple Queue Service (SQS) queue temporarily holds new document event notifications from the Amazon S3 input bucket. The AWS Lambda document classifier is configured to use the SQS queue as its event source. This setup allows for concurrency limits to be set, keeping execution rates consistent with desired TPS, thereby limiting calls to the Amazon Comprehend API.

Distributing Workloads Across AWS Regions and Accounts

While the rate-limiting architecture prevents throttling errors, designing within a single AWS Region still constrains request processing capacity. By distributing workloads across multiple AWS Regions and accounts, organizations can achieve higher overall TPS than a single Region can provide—thus enhancing document processing capacity. For instance, if an application requires 200 TPS and a single AWS Region can deliver 80, utilizing three Regions with the same capacity can yield a total TPS of 240.

The architecture outlined includes load distribution logic within the AWS Lambda document classifier to extend the solution across three AWS Regions.

By implementing request distribution logic, the AWS Lambda function can calculate the desired number of calls for each Region. For an even distribution among Regions, a random operation can be used to generate a number between 1 and 100, designating the percentage of available TPS for each destination. For example, a range of 1-33 may route requests to the us-west-1 region, 34-66 to us-east-1, and the rest to the us-east-2 region.

This random allocation can be refined further with a persistent tracking mechanism, such as counters in Amazon DynamoDB.

For additional insights on related topics, you can check out this blog post on bias in the workplace. Moreover, SHRM provides excellent resources on employee accountability, which can be beneficial for organizations looking to enhance their processes. Lastly, for those starting out in Amazon, this Reddit thread offers a wealth of information.

Location: Amazon IXD – VGT2, 6401 E HOWDY WELLS AVE LAS VEGAS NV 89115


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *