exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 77 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 77
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer deploys an AWS Lambda function that runs each time a new Amazon S3 bucket is created. The Lambda function is supposed to attach an S3
Lifecycle policy to each new S3 bucket. The developer discovers that newly created S3 buckets have no S3 Lifecycle policy attached.
Which AWS service should the developer use to find a possible error in the Lambda function?

  • A. AWS CloudTrail
  • B. Amazon S3
  • C. AWS CloudFormation
  • D. Amazon CloudWatch
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
hongy
Highly Voted 2 years, 7 months ago
D Using CloudWatch Logs to find the error messages.
upvoted 10 times
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: A
A) Correct - CloudTrail logs all API calls made in your AWS environment, including Lambda invocations and calls to other services (like S3). By inspecting CloudTrail logs, you can verify whether the Lambda function was triggered by the creation of the new S3 bucket and if it successfully made the API calls to attach the lifecycle policy.
upvoted 1 times
sumanshu
4 months, 1 week ago
D) - Eliminated - While CloudWatch can help you investigate Lambda function issues (e.g., via logs), it doesn't track all API calls like CloudTrail does. If the Lambda function failed silently or didn’t invoke properly, CloudWatch may not give you a clear picture of what caused the failure (for example, it won't show the S3 bucket creation event that triggered the Lambda).
upvoted 1 times
...
sumanshu
4 months, 1 week ago
Not Sure -- D) - Also looks correct - While CloudTrail records API calls made to AWS services, it might not provide the detailed information about the internal execution of the Lambda function that's needed for debugging.
upvoted 1 times
...
...
kishkish
1 year, 2 months ago
Selected Answer: D
CloudWatch contain valuable information, including errors and print statements from the Lambda function execution, which will be helpful for troubleshoot the error
upvoted 2 times
...
Jazz888
1 year, 3 months ago
D- Reason I would go for D is, to achieve this we need to make use of EventBridge to capture the event of newly created S3 bucket and invoke Lambda Function for matching event pattern.
upvoted 1 times
...
Wendy1113
1 year, 5 months ago
D https://blog.awsfundamentals.com/cloudwatch-vs-cloudtrail-understanding-the-differences In conclusion, while both AWS CloudWatch and CloudTrail are monitoring and logging services, they serve different purposes. CloudWatch is used to monitor and log the internal workings of an application, while CloudTrail is used to track all API activities that take place within an AWS account. CloudWatch provides various products, such as Logs, Metrics, Alarms, X-Ray, Synthetics, and Evidently. These products can be used to set alarms for Lambda errors, create dashboards, and debug user requests.
upvoted 1 times
...
ninomfr64
1 year, 8 months ago
Selected Answer: D
CW Metrics and Logs allows you to identify errors in the Lambda executions
upvoted 1 times
...
AWSdeveloper08
1 year, 9 months ago
Selected Answer: D
https://aws.amazon.com/blogs/mt/monitoring-aws-lambda-errors-using-amazon-cloudwatch/
upvoted 2 times
...
Yasser001
1 year, 9 months ago
Selected Answer: A
A. AWS CloudTrail AWS CloudTrail is the service that provides a record of actions taken by a user, role, or AWS service in your AWS account. It logs API calls made to various AWS services, including Lambda function invocations, S3 bucket creations, and other actions. By reviewing the CloudTrail logs, the developer can find detailed information about the API calls made to create the new S3 buckets and check if there were any errors or issues related to attaching the S3 Lifecycle policy. By investigating the CloudTrail logs, the developer can identify any errors or exceptions that occurred during the Lambda function's execution and troubleshoot the issue with attaching the S3 Lifecycle policy to the newly created buckets. This will help the developer understand what went wrong and take corrective actions to ensure the Lambda function works as intended.
upvoted 4 times
...
r3mo
1 year, 9 months ago
A: AWS CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of an AWS account. It records API calls and events that occur within the account, providing a history of activity. By analyzing the CloudTrail logs, the developer can identify if there are any errors or issues related to the Lambda function's execution.
upvoted 3 times
...
bakamon
1 year, 10 months ago
Selected Answer: D
Option A is incorrect because AWS CloudTrail is a service that provides a record of actions taken by a user, role, or an AWS service in an AWS account, not for finding errors in a Lambda function
upvoted 2 times
...
bakamon
1 year, 10 months ago
Selected Answer: B
Option A is incorrect because AWS CloudTrail is a service that provides a record of actions taken by a user, role, or an AWS service in an AWS account, not for finding errors in a Lambda function
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: D
We are not evaluation the API calls to aws service, we want to debug and find any error in the lambda function. I disagree with most of you, in my opinion D is the correct answer. Eache function has a start and an end that is logged in CloudWatch plus other logs commands in the function will be reported on CloudWatch
upvoted 1 times
...
pranay_2406
1 year, 11 months ago
Selected Answer: A
A. AWS CloudTrail AWS CloudTrail provides detailed logging and auditing capabilities for API actions across various AWS services, including AWS Lambda and Amazon S3. By enabling CloudTrail, the developer can capture the API calls made to create the S3 buckets and review the logs to identify any errors or issues in the Lambda function execution. With CloudTrail, the developer can track the API activity and see if the Lambda function is invoked properly when a new S3 bucket is created. It can help identify any errors, exceptions, or misconfigurations that may be causing the S3 Lifecycle policy not to be attached. By reviewing the CloudTrail logs, the developer can gain visibility into the sequence of API calls, parameters, and responses, allowing them to troubleshoot and resolve the issue with the Lambda function not attaching the S3 Lifecycle policy as expected.
upvoted 2 times
...
rlnd2000
1 year, 12 months ago
Selected Answer: D
D is obvious answer, any error in lambda will be in cloudwatch log.
upvoted 1 times
...
MrTee
2 years ago
D. Amazon CloudWatch to find a possible error in the Lambda function. Amazon CloudWatch allows the developer to monitor and troubleshoot the Lambda function by providing access to logs and metrics. The developer can use this information to identify and fix any issues that may be preventing the Lambda function from attaching an S3 Lifecycle policy to newly created S3 buckets.
upvoted 1 times
...
Syre
2 years ago
Selected Answer: A
You guys are wrong. Stop agreeing on wrong answers. It’s A. Option D, Amazon CloudWatch, is incorrect because it is a monitoring service for AWS resources and applications. While CloudWatch can be used to monitor the performance of Lambda functions, it does not provide a mechanism to identify issues in the Lambda function itself.
upvoted 4 times
rlnd2000
1 year, 12 months ago
Can you please explain how to use s3 for finding errors in lambda? the question is... Which AWS service should the developer use to find a possible error in the Lambda function?
upvoted 1 times
rlnd2000
1 year, 12 months ago
I meant CloudTrial
upvoted 1 times
...
...
...
appuNBablu
2 years, 2 months ago
D, because even though we could use cloudTrial to trace access requests for AWS service before determining API access request we need to check if there is an error in Lambda and for that we can use cloudWatch logs
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago