At a mobile FinTech startup, the cloud development team is building a serverless document-upload feature where authenticated mobile app users upload 250 MB PDF statements directly to a private Amazon S3 bucket (bypassing API Gateway's 10 MB payload limit). Select and order the 4 architectural steps from login to direct S3 upload.
- A. Order 1 -> 2 -> 3 -> 4: (1) Authenticate the mobile user against an Amazon Cognito User Pool and receive a signed JWT ID/Access token -> (2) Call an Amazon API Gateway REST endpoint (protected by a Cognito User Pool Authorizer) that invokes an AWS Lambda function -> (3) Have the Lambda function (whose Execution Role holds `s3:PutObject` permission) call the S3 SDK `generate_presigned_url('put_object')` with a 15-minute expiration and return the URL to the client -> (4) Have the mobile client perform an HTTP `PUT` of the 250 MB file directly to Amazon S3 using the Pre-Signed URL.
- B. Order 4 -> 3 -> 2 -> 1: (1) Upload the 250 MB PDF directly through API Gateway -> (2) Invoke Lambda -> (3) Generate a Pre-Signed URL after upload -> (4) Authenticate with Cognito last.
- C. Order 1 -> 3 -> 4 -> 2: (1) Authenticate with Cognito -> (2) Embed static IAM root access keys inside the mobile app binary -> (3) Upload to S3 -> (4) Call API Gateway.
- D. Order 2 -> 1 -> 3 -> 4: (1) Call API Gateway unauthenticated -> (2) Make the S3 bucket completely public -> (3) Generate a Pre-Signed URL with no IAM permissions -> (4) Upload via SQS.
Reveal Verified Answer (A), Technical Explanation & Exam Hack
Correct Answer: Option A
Because Amazon API Gateway enforces a hard 10 MB payload ceiling and 29-second timeout, large binary uploads always authenticate via Cognito (Step 1), request a short-lived S3 Pre-Signed URL from a Lambda function whose Execution Role has `s3:PutObject` permission (Steps 2-3), and upload directly from the client to S3 via HTTP PUT (Step 4). Architectural Deep Dive: AWS Lambda executes serverless functions up to 15 minutes with 128 MB to 10 GB memory, 512 MB to 10 GB /tmp ephemeral storage, Lambda Layers for shared libraries/dependencies across functions, Provisioned Concurrency (or Lambda SnapStart for Java/Python/.NET) to eliminate cold starts, and Reserved Concurrency to guarantee and cap maximum concurrent executions for a specific function. Why Distractors Fail: Option B (Order 4 -> 3 -> 2 -> 1: (1) Upload the 250 MB PDF directly through API Gate...) is incorrect because that service applies to a different workload pattern and confuses Reserved Concurrency (which throttles/caps concurrency and does NOT pre-warm execution environments) with Provisioned Concurrency (which pre-warms environments to eliminate cold-start latency). Option C (Order 1 -> 3 -> 4 -> 2: (1) Authenticate with Cognito -> (2) Embed static I...) is incorrect because that service applies to a different workload pattern and exceeds API Gateway's hard 29-second integration timeout or 10 MB payload ceiling instead of using S3 Pre-Signed URLs for large file uploads or asynchronous invocation patterns. Option D (Order 2 -> 1 -> 3 -> 4: (1) Call API Gateway unauthenticated -> (2) Make th...) is incorrect because that service applies to a different workload pattern and exceeds API Gateway's hard 29-second integration timeout or 10 MB payload ceiling instead of using S3 Pre-Signed URLs for large file uploads or asynchronous invocation patterns.