0

I want to create a log for every request on the api that we are using. Can you send custom trails to the cloud trail to have a breadcrumb on every request?

I connected the serverless lambda with the cloud trail and it is giving me a "trail" but somehow the request that gets the page isn't recorded.

The things that are recorded are the login (which connects to the cognito) and some bunch of stuff that has an event name of "ListFunctions20150331" and "GetTrailStatus" (which I don't get too, can someone explain what these are too?).

I want to record every reqeust that comes in on the api that I am using.

mutedeuphonies
  • 343
  • 1
  • 15
  • I have a similar question, let's say I have a service running in EKS POD, and from that service I need to log many events like data deleted, application started/stopped, and need to log it in a specific format(json). is it allowed in CloudTrail? or it just captures only pre-configured events like lambda calls etc? – Shankar S Jan 16 '23 at 08:46

1 Answers1

1

Logging at request level is a separate flag on CloudTrail and not enabled by default - if you go into the settings for your trail in the Console, there should be a section called Data Events. Within that, select to log events on your Lambda function. Please note however that logging for Lambda events does have additional cost associated with it.

More details are available on the CloudTrail documentation page: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events

user unknown
  • 421
  • 1
  • 5
  • 14