MCQs on AWS Lambda with DynamoDB and RDS | AWS Lambda Multiple Choice Questions

AWS Lambda MCQ Questions and Answers: Enhance Your Skills with DynamoDB and RDS Integration

Are you looking to master AWS Lambda integration with DynamoDB and RDS? This set of AWS Lambda MCQ questions and answers will help you learn how to connect Lambda with DynamoDB for CRUD operations, integrate it with RDS (MySQL, PostgreSQL), and manage database connections securely. Perfect for exam preparation or hands-on practice!

Chapter 8: AWS Lambda with DynamoDB and RDS – MCQs

1. Which AWS service is used to perform CRUD operations from Lambda on DynamoDB?

a) AWS SDK
b) Amazon RDS
c) AWS CLI
d) AWS IAM

2. What type of event does DynamoDB Streams provide for Lambda triggers?

a) Object creation
b) Item updates, deletions, and inserts
c) New table creation
d) Function execution events

3. What is the maximum number of read capacity units that Lambda can consume when accessing DynamoDB?

a) 10
b) 25
c) 50
d) There is no limit

4. How do you connect AWS Lambda to an RDS instance?

a) Through an API Gateway
b) By using the AWS RDS endpoint URL
c) By using Amazon EC2 instances
d) Through the AWS Lambda runtime

5. Which AWS RDS database engines can be integrated with AWS Lambda?

a) MySQL
b) PostgreSQL
c) Oracle
d) All of the above

6. What AWS SDK module is typically used in Lambda to interact with DynamoDB?

a) AWS.DynamoDB
b) AWS.DynamoDB.Client
c) DynamoDB.Interface
d) AWS.RDS

7. What is required to use Lambda with DynamoDB Streams?

a) DynamoDB Streams must be enabled on the table
b) AWS Lambda needs a VPC connection
c) A direct connection to S3
d) A custom event source must be created

8. Which of the following is NOT a benefit of using DynamoDB Streams with Lambda?

a) Real-time updates on data changes
b) Replicating data to other AWS regions
c) Triggering Lambda functions on table modifications
d) Storing data in S3

9. What is the typical use case for using AWS Lambda with RDS?

a) Performing SQL queries on RDS tables
b) Creating DynamoDB tables
c) Setting up VPC connections
d) Managing serverless EC2 instances

10. Which Lambda function permission is required to interact with DynamoDB?

a) AWSLambdaDynamoDBPolicy
b) AWSLambdaBasicExecutionRole
c) DynamoDBFullAccess
d) LambdaExecutionRole

11. How can you secure database connections when integrating Lambda with DynamoDB or RDS?

a) Use IAM roles and policies
b) Hardcode credentials in Lambda
c) Use S3 buckets for credential storage
d) Use public database access

12. When writing data to DynamoDB from Lambda, what method is typically used?

a) PutItem
b) UpdateItem
c) GetItem
d) DeleteItem

13. Which of the following can Lambda functions perform with DynamoDB?

a) Read and write data
b) Perform table backups
c) Create and manage indexes
d) Only read data

14. What is the primary benefit of using Lambda with DynamoDB Streams?

a) To automate table backups
b) To reduce the complexity of SQL queries
c) To react to data changes in real-time
d) To increase database performance

15. How can Lambda functions manage database credentials securely for RDS?

a) By storing credentials in environment variables
b) By using AWS Secrets Manager
c) By hardcoding credentials in the Lambda function
d) By using AWS CloudTrail for auditing

16. In which scenario is AWS Lambda used with DynamoDB Streams?

a) To perform backups
b) To capture changes to items and trigger functions
c) To manage table schema changes
d) To update DynamoDB index configurations

17. What type of Lambda function can interact with RDS instances in a VPC?

a) A Lambda function inside a VPC
b) A Lambda function outside the VPC
c) A Lambda function using public IPs
d) A Lambda function with VPC peering

18. What method should be used to insert an item into a DynamoDB table from a Lambda function?

a) PutItem
b) UpdateItem
c) BatchWriteItem
d) QueryItem

19. How does AWS Lambda ensure secure communication with DynamoDB?

a) By using SSL/TLS encryption
b) By using IP whitelisting
c) By using unencrypted HTTP
d) By using direct access to EC2 instances

20. Which of the following is a common practice when writing data to RDS from Lambda?

a) Use SQL INSERT statements within the Lambda code
b) Store data in DynamoDB and sync to RDS
c) Write directly to S3 and let RDS sync
d) Avoid writing data from Lambda to RDS

21. What is the role of IAM policies in securing Lambda and DynamoDB interactions?

a) To allow Lambda to assume a specific role for access
b) To encrypt Lambda functions
c) To track Lambda function execution
d) To enforce data retention in DynamoDB

22. What AWS service should be used for monitoring Lambda and DynamoDB integration?

a) AWS CloudWatch
b) AWS X-Ray
c) AWS CloudTrail
d) AWS Inspector

23. How can Lambda handle high-frequency events in DynamoDB Streams?

a) By automatically scaling the Lambda function
b) By sending data to S3
c) By using API Gateway
d) By reducing the batch size in DynamoDB Streams

24. Which of the following is an example of using Lambda with RDS?

a) Triggering a function when a new RDS instance is created
b) Querying RDS to update customer records
c) Managing RDS instance backups
d) Scaling RDS automatically

25. What happens when a Lambda function tries to interact with a private RDS database?

a) It triggers an error and stops
b) It needs an IAM role with network access permissions
c) It accesses RDS through a public endpoint
d) It automatically resolves the connection issue

26. Can Lambda functions use RDS for both transactional and analytical queries?

a) Yes, but only for transactional queries
b) Yes, for both transactional and analytical queries
c) No, Lambda only supports transactional queries
d) No, Lambda can only use DynamoDB for analytics

27. Which AWS service can Lambda use to securely store database credentials?

a) AWS Secrets Manager
b) S3 Bucket
c) CloudFormation
d) EC2 Instance Metadata

28. How can Lambda functions securely interact with RDS over the network?

a) By using a VPC and security groups
b) By using public IP addresses
c) By using direct internet connections
d) By connecting to DynamoDB as an intermediary

29. What is the maximum item size for a single write to DynamoDB?

a) 4 MB
b) 1 MB
c) 400 KB
d) 10 MB

30. What is the main advantage of using DynamoDB with Lambda instead of traditional relational databases?

a) Real-time event-driven architecture
b) Complex SQL queries are easier to manage
c) Direct integration with RDS
d) Improved data consistency and ACID compliance


Answer Key:

QnoAnswer (Option with the text)
1a) AWS SDK
2b) Item updates, deletions, and inserts
3d) There is no limit
4b) By using the AWS RDS endpoint URL
5d) All of the above
6a) AWS.DynamoDB
7a) DynamoDB Streams must be enabled on the table
8b) Replicating data to other AWS regions
9a) Performing SQL queries on RDS tables
10a) AWSLambdaDynamoDBPolicy
11a) Use IAM roles and policies
12a) PutItem
13a) Read and write data
14c) To react to data changes in real-time
15b) By using AWS Secrets Manager
16b) To capture changes to items and trigger functions
17a) A Lambda function inside a VPC
18a) PutItem
19a) By using SSL/TLS encryption
20a) Use SQL INSERT statements within the Lambda code
21a) To allow Lambda to assume a specific role for access
22a) AWS CloudWatch
23a) By automatically scaling the Lambda function
24b) Querying RDS to update customer records
25b) It needs an IAM role with network access permissions
26b) Yes, for both transactional and analytical queries
27a) AWS Secrets Manager
28a) By using a VPC and security groups
29b) 1 MB
30a) Real-time event-driven architecture

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top