Concurrency Concepts for AWS Developer Associate Exam
Why Concurrency Concepts Matter
Understanding concurrency is essential for AWS developers because modern cloud applications must handle multiple requests simultaneously. AWS services like Lambda, DynamoDB, SQS, and API Gateway all have concurrency limits and behaviors that directly impact application performance, cost, and reliability. Questions about concurrency appear frequently on the AWS Developer Associate exam.
What is Concurrency?
Concurrency refers to the ability of a system to handle multiple operations or requests at the same time. In AWS, this manifests in several ways:
• Lambda Concurrency: The number of function instances processing events simultaneously
• DynamoDB Capacity: Read and write capacity units handling requests
• SQS Message Processing: Multiple consumers processing messages from queues
• API Gateway Throttling: Managing incoming API request rates
How Concurrency Works in Key AWS Services
AWS Lambda Concurrency:
• Unreserved Concurrency: Default pool of concurrent executions available to all functions (1,000 per region by default)
• Reserved Concurrency: Guarantees a set number of concurrent executions for a specific function and caps its maximum
• Provisioned Concurrency: Pre-initializes execution environments to eliminate cold starts
DynamoDB Concurrency:
• Provisioned mode uses Read Capacity Units (RCU) and Write Capacity Units (WCU)
• On-demand mode automatically scales to handle traffic
• Burst capacity provides short-term accommodation for traffic spikes
SQS and Concurrency:
• Standard queues support nearly unlimited throughput
• FIFO queues are limited to 300 messages per second (3,000 with batching)
• Lambda polling scales based on queue depth
Common Concurrency Issues and Solutions
• Throttling: Occurs when concurrency limits are exceeded. Solution: Implement exponential backoff, request limit increases, or use reserved concurrency
• Cold Starts: Latency when new Lambda instances initialize. Solution: Use provisioned concurrency for latency-sensitive applications
• Hot Partitions: Uneven distribution in DynamoDB. Solution: Design partition keys for even distribution
• Race Conditions: Multiple processes competing for resources. Solution: Use DynamoDB transactions or conditional writes
Exam Tips: Answering Questions on Concurrency Concepts
Key Patterns to Recognize:
1. When you see throttling errors (429, ProvisionedThroughputExceededException): Think about increasing capacity, implementing retry logic with exponential backoff, or using reserved concurrency
2. When latency matters: Provisioned concurrency for Lambda eliminates cold starts; this is the answer for latency-sensitive workloads
3. When one function affects others: Reserved concurrency isolates functions and prevents one function from consuming all available concurrency
4. When you need guaranteed processing order: FIFO queues with message group IDs, but remember the throughput trade-offs
5. When scaling is mentioned: On-demand DynamoDB or Lambda with unreserved concurrency handles variable workloads automatically
Numbers to Remember:
• Default Lambda concurrent executions: 1,000 per region
• FIFO queue throughput: 300 TPS (3,000 with batching)
• Lambda timeout maximum: 15 minutes
• DynamoDB strongly consistent read: 1 RCU = 4KB
• DynamoDB eventually consistent read: 1 RCU = 8KB
Red Flags in Answer Choices:
• Answers suggesting unlimited scaling exist - there are always limits
• Solutions that do not address the root cause of throttling
• Using provisioned concurrency for cost optimization alone (it costs more)
Best Practice Indicators:
• Exponential backoff for retry logic
• Reserved concurrency for critical functions
• Provisioned concurrency for consistent low latency
• Dead letter queues for failed processing
• CloudWatch alarms for monitoring concurrency metrics