Introduction to Node.js

0.0(0)
studied byStudied by 0 people
0.0(0)
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:51 AM on 11/25/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

16 Terms

1
New cards
What is Node.js?
A JavaScript runtime environment that allows you to run JavaScript code on the server instead of in a browser.
2
New cards
Why do we use Node.js in Lambda?
Because Lambda supports Node.js natively, allowing JavaScript code to run serverlessly without managing servers.
3
New cards
What is a Lambda Function?
A small, serverless function hosted by AWS that runs your code only when triggered (e.g., by API Gateway).
4
New cards

Where will you develop and test your Lambda code?

In the AWS Lambda Console using the built in code editor and Test button.

5
New cards
Where does your Lambda code run?
On AWS-managed infrastructure in the cloud, only when triggered.
6
New cards
Structure of a Lambda handler
export const handler = async (event) => { return response; };
7
New cards
What is the event object?
A JSON structure containing all input sent to the Lambda (parameters, body, headers).
8
New cards
What does JSON.stringify do?
Converts JavaScript objects/strings into JSON-formatted strings required in Lambda responses.
9
New cards
What is a Lambda response object?
An object with statusCode and body fields, where body must be a string.
10
New cards
What does += mean?
Addition assignment operator; x += y is the same as x = x + y.
11
New cards
What does a for loop do?
Repeats code while incrementing or decrementing a counter until a condition is false.
12
New cards
Where do console.log outputs appear?
In CloudWatch Logs for each Lambda function.
13
New cards
Why return JSON in Lambda?
APIs expect structured JSON so browser JavaScript can parse it easily.
14
New cards

What is serverless computing?

Running code without managing servers. AWS automatically handles execution.

15
New cards

When does code run in a Lambda function?

Code in an AWS Lambda function runs in response to an event

16
New cards

What does Async do

makes a function run asynchronously so it can WAIT for things like database queries or API calls without freezing.