A serverless application must ensure that each SQS message is processed exactly once end-to-end, even if the consumer crashes after partially writing to DynamoDB. Which architecture best achieves this guarantee?
Answer
Use SQS standard queues with a transactional outbox pattern and DynamoDB conditional writes on a unique idempotency key
Explanation
Exactly-once end-to-end is achieved by making writes idempotent and preventing duplicate side effects using conditional/idempotency keys. The outbox pattern helps ensure consistent emission of downstream actions even under retries and crashes.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A company uses AWS Systems Manager to patch hundreds of EC2 instances. During a roll-out, 20% of instances fail due to missing dependencies and must be remediated automatically, while the remaining instances should continue without being blocked. Which approach best fits this requirement?
View question →
An organization wants a disaster recovery plan where RTO is 15 minutes and RPO is under 5 minutes for a stateful web application. The application uses EBS-backed EC2 instances and a multi-AZ ALB front end. Which strategy most closely meets these targets with minimal manual intervention?
View question →
In a hybrid environment, you need low-latency connectivity and predictable throughput between on-premises and AWS, with failover handled automatically. Which network architecture most directly achieves this?
View question →
In a multi-account landing zone using AWS Organizations and centralized billing, which approach best enables deterministic enforcement of encryption and access controls for new resources created by existing teams?
View question →
You are migrating from a monolithic relational database to a microservices architecture. Services must share data but differ in consistency needs: some require strong consistency, others can tolerate eventual consistency within minutes. Which design best fits these constraints while minimizing cross-service coupling?
View question →
A customer wants to use S3 for application logs with cost control, frequent analytical queries, and compliance requirements that prohibit deleting raw logs. Which S3 configuration is best?
View question →