Learning
Learning
Loading practice session...
AWS Certified Developer - Associate · Exam domain
70 practice questions in this domain. AI-tutored explanations for every answer.
Sign in to practice all 70 questions with progress tracking and AI explanations.
1. A developer is writing an AWS Lambda function in Node.js and needs to access the name of the Amazon S3 bucket that triggered the invocation. Which argument should the developer inspect to find this information?
Explanation
The event object passes the input data (such as the S3 bucket name and object key) to the handler function. The context object contains runtime information, not the invocation payload.
2. During troubleshooting, a developer needs to log the remaining execution time of a Lambda function before it times out. How can the developer programmatically access this value within the function code?
Explanation
The context object includes the getRemainingTimeInMillis() method, returning the milliseconds left before the function times out. The event object only contains the trigger's input payload.
3. A developer notices that a computationally intensive AWS Lambda function is taking too long to process video files. The function does not make any network calls. How can the developer reduce the function's execution time?
Explanation
AWS Lambda allocates CPU power linearly in proportion to the amount of memory configured. You cannot manually configure CPU directly; you must increase the memory setting to get more compute.
4. An AWS Lambda function is triggered by an Amazon API Gateway request to fetch data from an external API. Intermittently, the function throws an error after exactly 3 seconds, even though the external API takes 5 seconds to respond. What is the most likely cause?
Explanation
The default timeout for a new AWS Lambda function is 3 seconds (with a maximum of 15 minutes). If a downstream call takes longer, the function will timeout unless the setting is increased.
5. A developer is architecting a system where an Amazon S3 bucket triggers an AWS Lambda function upon object creation. Which invocation model does Amazon S3 use to trigger the Lambda function, and how are retries handled?
Explanation
S3 triggers Lambda asynchronously. In the asynchronous model, Lambda places the event in a queue and automatically retries errors up to two times with delays between retries.
Practice all 70+ questions in this domain
Start free practice →