Spring Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Amazon Web Services AWS Certified Developer - Associate DVA-C02 Question # 150 Topic 16 Discussion

Amazon Web Services AWS Certified Developer - Associate DVA-C02 Question # 150 Topic 16 Discussion

DVA-C02 Exam Topic 16 Question 150 Discussion:
Question #: 150
Topic #: 16

A developer has implemented an AWS Lambda function that inserts new customers into an Amazon RDS database. The function is expected to run hundreds of times each hour. The function and RDS database are in the same VPC. The function is configured to use 512 MB of RAM and is based on the following pseudocode:

def lambda_handler(event, context):

db = database.connect()

db.statement("INSERT INTO Customers (CustomerName) VALUES (%s)", event.name)

db.execute()

db.close()

After successfully testing the function multiple times, the developer notices that the execution time is longer than expected.

What should the developer do to improve performance?


A.

Increase the reserved concurrency of the Lambda function.


B.

Increase the size of the RDS database to facilitate an increased number of database connections each hour.


C.

Move the database connection and close statement out of the handler. Place the connection in the global space.


D.

Replace Amazon RDS with Amazon DynamoDB to implement control over the number of writes per second.


Get Premium DVA-C02 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.