1.1 - Developing with Lambda and serverless
AWS Certified Developer Associate objective 1.1 covers building serverless applications. AWS Lambda runs code in response to events without you provisioning or managing servers, billing per request and duration. When a function suffers cold-start latency, provisioned concurrency on an alias or version keeps a fixed pool of pre-initialised execution environments warm and ready to respond instantly. To retrieve only specific rows and columns from a large object instead of downloading it whole, S3 Select queries object content with SQL, cutting data transfer and cost. You should also know Lambda handlers, memory and timeout tuning, environment variables, layers and the event/context model. Expect scenario questions that describe event-driven compute, eliminating cold-start latency, or filtering object data server-side, and ask which serverless feature - Lambda, provisioned concurrency or S3 Select - is the right choice.
Run code on events, no servers = Lambda. Kill cold starts with a warm pool = provisioned concurrency (on alias/version). Query rows/columns inside an S3 object with SQL = S3 Select.
Practice questions
1. Which service runs code in response to events without you provisioning or managing servers?
- Amazon EC2
- AWS Lambda (correct answer)
- Amazon Lightsail
- AWS Batch
Lambda is serverless compute: you upload a function and it runs on events (API Gateway, S3, SQS...), scaling automatically and billing per millisecond. No servers to manage.
2. Which DynamoDB element uniquely identifies an item and determines its physical partition?
- The primary key (partition key, optional sort key) (correct answer)
- A global secondary index on a non-key attribute
- The provisioned read/write throughput
- The item's time-to-live (TTL) attribute
The primary key uniquely identifies each item. The partition key sets the partition; an optional sort key allows multiple items per partition key, ordered.
3. Which SQS queue type guarantees messages are processed exactly once and in the exact order sent?
- FIFO queue (correct answer)
- Standard queue
- Dead-letter queue
- Delay queue
FIFO queues preserve strict ordering and exactly-once processing (with deduplication). Standard queues offer higher throughput but at-least-once delivery and best-effort ordering.
4. A developer needs to trigger a Lambda function whenever a new object is created in an S3 bucket. What configures this?
- A DynamoDB stream configured on the S3 bucket
- An S3 event notification to the Lambda function (correct answer)
- A CloudFront cache behavior on the bucket
- An SNS topic subscribed to an EC2 instance
S3 event notifications can invoke Lambda (or send to SQS/SNS) on events like s3:ObjectCreated:*. This is the standard event-driven trigger for object uploads.
5. A developer wants to guarantee a fixed pool of pre-initialized execution environments so a latency-sensitive Lambda avoids cold starts. Which feature provides this?
- Reserved concurrency capping the function
- A larger ephemeral /tmp storage allocation
- Provisioned concurrency on the alias or version (correct answer)
- An SQS event source with a large batch size
Provisioned concurrency keeps a set number of environments initialized and ready, eliminating cold starts for that count. Reserved concurrency only caps/reserves how many can run, it does not pre-warm them.
6. Several Lambda functions share the same heavy dependency libraries. What packages these once for reuse across functions?
- A Lambda layer referenced by each function (correct answer)
- A separate DynamoDB table storing the libraries
- A larger memory setting on each function
- An S3 lifecycle rule copying the libraries
A Lambda layer is a zip of libraries or runtime content that multiple functions can attach, keeping deployment packages small and dependencies centralized. Layers mount under /opt.