AWS Lambda Fundamentals Quiz Quiz

Explore essential AWS Lambda concepts and best practices with this focused quiz, designed for those seeking a solid understanding of serverless compute. Assess your grasp on triggers, event models, configuration, scaling, and monitoring in cloud serverless environments.

  1. Event Source Example

    Which of the following scenarios best illustrates an event source that can directly trigger a Lambda function?

    1. An object is uploaded to a cloud storage bucket
    2. A user manually starts a virtual machine from the dashboard
    3. A network firewall blocks incoming traffic
    4. A desktop application runs a scheduled backup

    Explanation: Uploading an object to a storage bucket is a typical event that triggers Lambda functions directly, making it the correct example. Manual actions in a dashboard are usually not event-driven in this context. Scheduled backups from desktop applications do not connect directly as event sources; they require custom integration. Firewall rules blocking traffic act as security controls, not direct event triggers for Lambda.

  2. Lambda Execution Time Limit

    What is the maximum execution timeout for a single Lambda function invocation?

    1. 1 hour
    2. 24 hours
    3. 60 seconds
    4. 15 minutes

    Explanation: The maximum allowed execution duration for a Lambda function invocation is 15 minutes, after which it is terminated automatically. One hour and twenty-four hours exceed the service's upper limit. Sixty seconds is a lower figure, but not the upper bound, so it is incorrect. Only 15 minutes is accurate.

  3. Scaling Lambda Functions

    How does a serverless environment like Lambda handle multiple events arriving simultaneously?

    1. By requiring user intervention to spawn new servers
    2. By queueing all events to be handled one after another by the same function
    3. By automatically running multiple instances to process events in parallel
    4. By rejecting excess events over a strict limit

    Explanation: Lambda handles simultaneous events by spinning up multiple concurrent instances, supporting automatic parallel processing. Queueing events on a single instance would create delays and reduce scalability. Manual server management is not required, as provision is handled automatically. While there are concurrency limits, excess events are typically queued, not outright rejected, so the option describing outright rejection is not accurate.

  4. Lambda Environment Variables

    In which scenario should you use an environment variable for a Lambda function?

    1. To permanently archive application logs
    2. To hold large blobs of binary data for processing
    3. To store a configuration value like a database connection string
    4. To save user-generated temporary files

    Explanation: Environment variables are best suited for small amounts of configuration data, such as database connection strings, needed during function execution. They are not designed for storing temporary files or binary data, which require different storage services. Archiving logs permanently is outside the use case for environment variables, as they are ephemeral and limited in size.

  5. Observability in Lambda

    What is a primary method for monitoring Lambda functions and troubleshooting issues?

    1. Reviewing the automatically generated logs after each invocation
    2. Requesting support to manually watch all executions
    3. Physically inspecting the server hardware
    4. Examining the operating system event viewer

    Explanation: Automatically generated logs for each invocation provide useful insight into Lambda function behavior, making this the most effective routine monitoring method. Operating system event viewers are not accessible in serverless environments. Physically inspecting hardware is impractical and irrelevant in managed cloud services. Requesting manual oversight is neither scalable nor feasible for robust monitoring.