AWS Developer DVA-C02 · Development with AWS Services · medium
A photo-sharing platform stores private user photos in an Amazon S3 bucket (Block Public Access = ON). When an authenticated user clicks 'Upload Avatar (15 MB)' or 'Download Invoice PDF' in the browser, the backend AWS Lambda function should not proxy the 15 MB binary payload through API Gateway (10 MB payload limit). Instead, what should the Lambda function generate and return to the browser so the client can upload or download the object directly to/from Amazon S3 for the next 15 minutes?
Published · Last updated · checked before publication — how we verify questions
Options
Answer: C. An Amazon S3 Presigned URL (putObject / getObject) with a 15-minute expiry
Generating an Amazon S3 Presigned URL (generate_presigned_url / getSignedUrl for putObject or getObject with an expiration like ExpiresIn=900 seconds) grants temporary, time-bounded permission (inheriting the signing IAM role's permissions) for the client browser to upload or download directly to/from S3 while bypassing API Gateway's 10 MB payload limit.
Why the other options are wrong
- A. Make the S3 bucket public (Principal: "*") for 15 minutes during each PutObject upload — Opening the bucket to the public exposes every user's private files.
- B. Base64-encode the 15 MB file and pass it through a synchronous API Gateway POST payload — API Gateway has a hard 10 MB maximum payload limit, so a 15 MB payload will fail with 413 Payload Too Large.
- D. An Amazon DynamoDB Time-to-Live (TTL) epoch attribute on the S3 BucketPolicy resource — DynamoDB TTL expires table items, not temporary S3 object upload URLs.
More Development with AWS Services questions
- A customer-facing checkout API built on AWS Lambda (Java 21 runtime) experiences a 3.2-second cold-start latency spike…
- An AWS Lambda function polls an Amazon SQS standard queue via an Event Source Mapping with a batch size of 10…
- An order-fulfillment workflow coordinates 6 sequential and parallel steps: reserve inventory, charge credit card…
- A web application hosted on https://app.example.com makes an XMLHttpRequest / fetch() POST call (with a custom…
- A financial ledger uses Amazon SQS FIFO (First-In-First-Out) queues (orders.fifo) to guarantee strict message ordering…
- A developer is designing indexes for an Amazon DynamoDB Orders table whose base primary key is CustomerId (Partition…
- The same Amazon DynamoDB table receives 50 standard writes per second of items that are 2.5 KB each, and 15…
- An application stores product catalog items in an Amazon DynamoDB table using Provisioned Capacity mode. Each item…
All Development with AWS Services questions and the topic overview →
AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.