Soru

Zorluk: OrtaServerless and Automated Scaling Architectures for Cost Efficiency

A company is designing an automated serverless workflow to coordinate its customer onboarding process. The workflow must execute several steps, including identity verification, account creation, and waiting for the customer to upload a signed agreement, which can take up to 5 days. The processing logic for each step is short-lived, completing in under 2 seconds. The initial onboarding requests must be processed in the exact order they are received to prevent race conditions. The company wants to minimize compute and database costs, ensuring that they do not pay for idle resources while waiting for the customer's document. Which architecture should a solutions architect recommend to meet these requirements?

  1. Configure an Amazon SQS FIFO queue to ingest the requests. Use an AWS Step Functions Standard Workflow to coordinate the onboarding process, invoking AWS Lambda functions for individual tasks, and pause the workflow using a task token callback until the signed document is uploaded.Cevap
  2. B
    Configure an Amazon SQS standard queue to ingest the requests. Use an AWS Step Functions Standard Workflow to coordinate the onboarding process, invoking AWS Lambda functions for individual tasks, and pause the workflow using a task token callback until the signed document is uploaded.
  3. C
    Configure an Amazon SQS FIFO queue to ingest the requests. Develop a single AWS Lambda function that executes the onboarding steps and uses an internal polling loop to check daily for the uploaded document until the onboarding process is complete.
  4. D
    Configure an Amazon SQS FIFO queue to ingest the requests. Use an AWS Step Functions Standard Workflow to coordinate the onboarding process, storing step metadata in an Amazon DynamoDB table configured with provisioned capacity.

Cevap

Configure an Amazon SQS FIFO queue to ingest the requests, use an AWS Step Functions Standard Workflow to coordinate the onboarding process with task token callbacks to pause execution, and use AWS Lambda for short-lived tasks.
The correct architecture uses an Amazon SQS FIFO queue to guarantee the ordering of incoming requests, and orchestrates the multi-day onboarding process using an AWS Step Functions Standard Workflow. Standard Workflows are billed per state transition and can run for up to a year, making them highly cost-effective because the system does not pay for compute resources while waiting for the customer's signed document. Individual short-lived tasks are executed by AWS Lambda, which scales to zero and only bills for active execution time.

Adım Adım Çözüm

1
Identify the messaging service that guarantees sequential processing.
An Amazon SQS FIFO queue is selected to process onboarding requests in the exact order they are received.
Standard SQS queues only provide best-effort ordering, which does not prevent race conditions.
2
Select the orchestration mechanism for a long-running, multi-day workflow.
An AWS Step Functions Standard Workflow is selected with a task token callback.
Standard Workflows can run for up to a year and are billed per state transition, ensuring the workflow can pause for up to 5 days at no cost.
3
Select the compute service for individual short-lived execution steps.
AWS Lambda is selected to run the 2-second processing steps.
Lambda is fully serverless, scales automatically, and only charges for the milliseconds of active compute time, scaling to zero when idle.

Anahtar Kavram

Integrating Amazon SQS FIFO queues with AWS Step Functions Standard Workflows allows orchestrating order-sensitive, long-running processes serverlessly without paying for idle compute time.
Tahmini Süre:2m 0s
Bu soruyu puanla