{"id":2381,"date":"2024-01-10T22:21:44","date_gmt":"2024-01-10T22:21:44","guid":{"rendered":"https:\/\/www.maghilda.com\/staging\/9669\/?p=2381"},"modified":"2024-01-10T22:25:34","modified_gmt":"2024-01-10T22:25:34","slug":"8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices","status":"publish","type":"post","link":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/","title":{"rendered":"8 Tips for AWS CloudTrail for security monitoring and best practices"},"content":{"rendered":"\n<p>1. CloudTrail is turned on by default and will store logs in the CloudTrail portal for 90 days. To extend the retention of the logs past 90 days, you need to configure a trail to send the logs to an S3 bucket. Additionally, you can also send the logs to CloudWatch to monitor your trail logs and notify you when specific activity occurs. Make sure to minimize access to the S3 bucket that CloudTrail writes to prevent destruction of logs. See the HOWTO section below on how to Enable Object Lock on the S3 bucket.<\/p>\n\n\n\n<p>2. By default only Management events (API calls that create\/delete\/start or stop a service or make a call into an existing service that is running) are recorded. This includes calls made by using the AWS management console, AWS SDKs, command line tools, and higher level AWS services. If you want to obtain Data events (paid service), such as API calls to retrieve\/store\/query S3 data, calls to Lambda functions, and Database API calls, you must create a Trail and enable optional events. Although there is a cost associated with enabling Data Events, I highly recommend doing so to get detailed insights into your events.<\/p>\n\n\n\n<p>3. Enable CloudTrail Log File Integrity. This gives you a cryptographic signature to ensure the logs you have received are not tampered, and can be verified easily with the AWS CLI. It will also give you a way to prove logs weren\u2019t deleted as you can use the public key to validate the digest file after the log files are delivered.<\/p>\n\n\n\n<p>4. Most resources in AWS are region specific. However, CloudTrail is configured to be global by default i.e. it is enabled in all AWS regions. Ensuring this default will enable more visibility and automatically track data from new Regions as they come online or can be alerted upon if the other regions are not being used but there is an activity. Disabling multi region logging gives a bad actor free reign in every region except for the one the trail was created in.<\/p>\n\n\n\n<p>5. Encrypt CloudTrail logs using server side encryption using KMS (SSE-KMS) instead of the S3 managed server side encryption (SSE-S3) to control key rotation, obtain auditing visibility into key usage and control who can read the CloudTrail log files within your organization.<\/p>\n\n\n\n<p>6. Set up an organization trail to monitor all of the logs generated by the AWS accounts within an\u00a0AWS Organization. AWS Organizations allows you to centrally manage the access permissions of users in all of the accounts in the organization, and can be\u00a0set up\u00a0at no additional cost. Organizations are recommended when your team needs to manage many different AWS accounts by governing your ever-changing environment and enforce configurations on your primary and member accounts.<\/p>\n\n\n\n<p>7. Implement a powerful search capability with CloudTrail, like an ELK cluster, Splunk, or a cloud service like Loggly or Papertrail as these integrations allow you to quickly add and remove filters to explore your data. Segment it from your production environment. If you\u2019re using a Lambda function to process these logs, make sure the Lambda function used to process logs cannot be tampered with by your production users and roles.<\/p>\n\n\n\n<p>8. Minimize access to the CloudTrail API. If a key or role is compromised with write access to any CloudTrail API actions (DeleteTrail, StopLogging, UpdateTrail), bad things could happen and can go undetected for a long time. For example, an attacker can run the following commands with the compromised account to cover their steps<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2014 delete trail\naws cloudtrail delete-trail --name &lt;your-trail-trail&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u2014 disable logging\naws cloudtrail stop-logging --name &lt;your-trail-trail&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>- disable multi-region and global services\u00a0logging\naws cloudtrail update-trail --name &lt;your-trail-trail> --no-is-multi-region-trail --no-include-global-service-events<\/code><\/pre>\n\n\n\n<p style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">Hence, grant least privileges to your users and roles. AWS suggests granting <a href=\"https:\/\/docs.aws.amazon.com\/aws-managed-policy\/latest\/reference\/AWSCloudTrail_ReadOnlyAccess.html\"><strong>AWSCloudTrail_ReadOnlyAccess<\/strong><\/a> policy which provides permissions to view the the logs, including recent events and event history. This policy also allows to view existing trails, event data stores, and channels. Roles and users with this policy can <a href=\"https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/view-cloudtrail-events-console.html#downloading-events\">download the event history<\/a>, but they can&#8217;t create or update trails, event data stores, or channels. You can further restrict with the policies below&nbsp;<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">HOWTO: Set up AWS CloudTrail Trails and extract logs on your local machine<\/h5>\n\n\n\n<h6 class=\"wp-block-heading\">Prerequisities<\/h6>\n\n\n\n<ul class=\"wp-block-list\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">\n<li>AWS CLI is installed<\/li>\n\n\n\n<li>jq command line utility is installed<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\">Create CloudTrail Trail via AWS management console<\/h6>\n\n\n\n<ol class=\"wp-block-list\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">\n<li>From the CloudTrail console, click <strong>Trails<\/strong> on the left navigation menu.<\/li>\n\n\n\n<li>Click <strong>Create Trail<\/strong><\/li>\n\n\n\n<li>Under <strong>General Details<\/strong>\n<ul class=\"wp-block-list\">\n<li>Enter <strong>Trail name<\/strong><\/li>\n\n\n\n<li>Check <strong>Enable for all accounts in my organization<\/strong><\/li>\n\n\n\n<li>Select <strong>Create new S3 bucket<\/strong><\/li>\n\n\n\n<li>Enter<strong> S3 bucket name <\/strong>under<strong> Trail log bucket and folder&nbsp;<\/strong><\/li>\n\n\n\n<li>Enter<strong> AWS KMS alias<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Under<strong> Additional settings<\/strong>\n<ul class=\"wp-block-list\">\n<li>Check<strong> Log file validation<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Under<strong> CloudWatch Logs &#8211; <em>optional<\/em><\/strong>\n<ul class=\"wp-block-list\">\n<li>Check<strong> Enabled<\/strong><\/li>\n\n\n\n<li>Enter<strong> name <\/strong>for<strong> Log group name<\/strong><\/li>\n\n\n\n<li>Enter<strong> Role name<\/strong><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Click<strong> Next<\/strong><\/li>\n\n\n\n<li>On the next page, review and Click<strong> Create Trail<\/strong><\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" width=\"805\" height=\"760\" src=\"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png\" alt=\"\" class=\"wp-image-2403\" style=\"width:572px;height:auto\" srcset=\"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png 805w, https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM-300x283.png 300w, https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM-768x725.png 768w\" sizes=\"(max-width: 805px) 100vw, 805px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" width=\"806\" height=\"749\" src=\"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.12.29-PM-1.png\" alt=\"\" class=\"wp-image-2406\" style=\"width:609px;height:auto\" srcset=\"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.12.29-PM-1.png 806w, https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.12.29-PM-1-300x279.png 300w, https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.12.29-PM-1-768x714.png 768w\" sizes=\"(max-width: 806px) 100vw, 806px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h6 class=\"wp-block-heading\">List Trails via the CLI<\/h6>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>aws cloudtrail list-trails\n<\/strong>\n{\n    \"Trails\": &#91;\n        {\n            \"TrailARN\": \"arn:aws:cloudtrail:us-east-1:123456789012:trail\/management-events-maghilda\",\n            \"Name\": \"management-events-maghilda\",\n            \"HomeRegion\": \"us-east-1\"\n        }\n    ]\n}<\/code><\/pre>\n\n\n\n<h6 class=\"wp-block-heading\">Describe Trails via the CLI<\/h6>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>aws cloudtrail describe-trails<\/strong>\n\n{\n    \"trailList\": &#91;\n        {\n            \"Name\": \"management-events-maghilda\",\n            \"S3BucketName\": \"aws-cloudtrail-logs-123456789012-14073d57\",\n            \"IncludeGlobalServiceEvents\": true,\n            \"IsMultiRegionTrail\": true,\n            \"HomeRegion\": \"us-east-1\",\n            \"TrailARN\": \"arn:aws:cloudtrail:us-east-1:123456789012:trail\/management-events-maghilda\",\n            \"LogFileValidationEnabled\": true,\n            \"CloudWatchLogsLogGroupArn\": \"arn:aws:logs:us-east-1:123456789012:log-group:aws-cloudtrail-logs-123456789012-decc01f1:*\",\n            \"CloudWatchLogsRoleArn\": \"arn:aws:iam::123456789012:role\/service-role\/CloudTrailRoleforCloudWatchLogs_maghilda\",\n            \"HasCustomEventSelectors\": true,\n            \"HasInsightSelectors\": false,\n            \"IsOrganizationTrail\": true\n        }\n    ]\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">\n<li>aws cloudtrail describe-trails reveals the S3 buckets being logged to.&nbsp;<\/li>\n\n\n\n<li>IncludeGlobalServiceEvents is true, the CloudTrail bucket will include logs for all regions.<\/li>\n\n\n\n<li>Logs land about every 15 minutes.<\/li>\n<\/ul>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Extract logs to your local machine<\/strong><\/h6>\n\n\n\n<p>Perform some activities to generate logs. For example, sign out and sign in.<br>Since we enabled log file validation when creating the Trail, you will see two folders in your S3 bucket<\/p>\n\n\n\n<ul class=\"wp-block-list\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">\n<li>CloudTrail<\/li>\n\n\n\n<li>CloudTrail-Digest<\/li>\n<\/ul>\n\n\n\n<p>Files under the digest folder are used for log file validation. Each file contains references to the actual log data files written in the past hour, with their digital signature. By comparing the signatures to the actual files, you can determine whether those files were modified after being delivered.<\/p>\n\n\n\n<p>CloudTrail saves your audit logs in gzip\u2019d json files in the S3 bucket that you specified when you created the Trail.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Filename format;\n{ACCOUNT_ID}_CloudTrail_{REGION}_{DATETIME}_{UNIQUESTRING}.json.gz<\/code><\/pre>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Download the CloudTrail logs from the s3 bucket<\/strong><\/h6>\n\n\n\n<p>On your machine, create a folder cloudtrail-logs and change the directory<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd cloudtrail-logs\n\naws s3 cp s3:\/\/aws-cloudtrail-logs-123456789012-14073d57\/AWSLogs\/o-4yaz7wm5fl\/123456789012\/CloudTrail\/us-east-1\/2024\/01\/09\/ . --recursive<\/code><\/pre>\n\n\n\n<p>You will notice a bunch of logs files downloaded to your folder. Unzip the files<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gzip -d *<\/code><\/pre>\n\n\n\n<p>Display the content of a file in the terminal<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>cat<\/strong> 123456789012_CloudTrail_us-east-1_20240109T2015Z_DiRi3MgyB7HRzeCu.json<\/code><\/pre>\n\n\n\n<p>This is not very reader friendly so we will use <strong>JQ<\/strong> next.<\/p>\n\n\n\n<p>To easily view and perform analysis on JSON log files, we can use command-line utility like JQ. JQ is a lightweight command-line processor for JSON and is invaluable in reading these logs and doing basic filtering on <strong>small sets of logs<\/strong>. For larger logs and cost effective queries, <a href=\"https:\/\/docs.aws.amazon.com\/athena\/latest\/ug\/cloudtrail-logs.html\">use Athena to query S3 logs<\/a>.<\/p>\n\n\n\n<p>Display the above file in json format<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>cat<\/strong> 123456789012_CloudTrail_us-east-1_20240109T2015Z_DiRi3MgyB7HRzeCu.json <strong>| jq .<\/strong><\/code><\/pre>\n\n\n\n<p>A few jq commands to look up logs.\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Filter on the SourceIPAddress. Display all IP addresses logged by CloudTrail:\njq '.Records&#91;] | .sourceIPAddress' *.json\n\nSelect only records with the sourceIPAddress=\njq '.Records&#91;] | select(.sourceIPAddress=\"41.156.31.69\")' *.json\n\nFilter on the eventSource.\njq '.Records&#91;] | .eventSource' *.json\n\nFilter on the eventName\njq '.Records&#91;] | .eventName' *.json\n\nFilter on the userAgent\njq '.Records&#91;] | .userAgent' *.json\n\nFilter on errorCode\njq '.Records&#91;] | .errorCode' *.json\n\nFilter where eventName = CreateToek\njq '.Records&#91;] | select(.eventName==\"CreateToken\")' *.json\n\ncat * | jq '.Records&#91;] | select(.eventName==\u201cCreateToken\")'\n\ncat * | jq '.Records&#91;] | select(.eventName==\"CreateToken\" or .eventName==\"PutBucketPolicy\" )\u2019\n<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Minimize access to CloudTrail API and S3 bucket containing CloudTrail logs<\/h5>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Ensure that the CloudTrail S3 buckets are not publicly accessible.<\/strong><\/h6>\n\n\n\n<pre class=\"wp-block-code\"><code>aws s3api get-public-access-block --bucket aws-cloudtrail-logs-123456789012-14073d57\n\n{\n    \"PublicAccessBlockConfiguration\": {\n        \"BlockPublicAcls\": true,\n        \"IgnorePublicAcls\": true,\n        \"BlockPublicPolicy\": true,\n        \"RestrictPublicBuckets\": true\n    }\n}<\/code><\/pre>\n\n\n\n<h6 class=\"wp-block-heading\"><strong>Ensure that the Object Lock is enabled.<\/strong><\/h6>\n\n\n\n<p>Ensure that the S3 buckets associated with your Amazon CloudTrail trails are configured to use the Object Lock feature in order to prevent the objects they store (i.e. trail log files) from being deleted and meet regulatory compliance.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>aws s3api get-object-lock-configuration --bucket aws-cloudtrail-logs-123456789012-14073d57\n\nAn error occurred (ObjectLockConfigurationNotFoundError) when calling the GetObjectLockConfiguration operation: Object Lock configuration does not exist for this bucket\n<\/code><\/pre>\n\n\n\n<p>Fix the above <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>aws s3api put-object-lock-configuration --bucket aws-cloudtrail-logs-123456789012-14073d57  --object-lock-configuration \u201cObjectLockEnabled=Enabled,Rule={DefaultRetention={Mode= GOVERNANCE,Days=30}}\"<\/code><\/pre>\n\n\n\n<p>Run the command again to validate the change<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>aws s3api get-object-lock-configuration --bucket aws-cloudtrail-logs-123456789012-14073d57\n\n{\n    \"ObjectLockConfiguration\": {\n        \"ObjectLockEnabled\": \"Enabled\"\n    }\n}\nSUCCESS!<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">References:<\/h5>\n\n\n\n<ul class=\"wp-block-list\" style=\"padding-right:var(--wp--preset--spacing--50);padding-left:var(--wp--preset--spacing--50)\">\n<li><a href=\"https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/cloudtrail-aws-service-specific-topics.html\">https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/cloudtrail-aws-service-specific-topics.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.trendmicro.com\/cloudoneconformity-staging\/knowledge-base\/aws\/CloudTrail\/cloudtrail-enabled.html\">https:\/\/www.trendmicro.com\/cloudoneconformity-staging\/knowledge-base\/aws\/CloudTrail\/cloudtrail-enabled.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.elastic.co\/en\/integrations\/aws\/cloudtrail\">https:\/\/docs.elastic.co\/en\/integrations\/aws\/cloudtrail<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.sans.org\/blog\/aws-cloud-log-extraction\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.sans.org\/blog\/aws-cloud-log-extraction\/<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/security_iam_id-based-policy-examples.html\">https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/security_iam_id-based-policy-examples.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/security_iam_service-with-iam.html#security_iam_service-with-iam-roles-tempcreds\">https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/security_iam_service-with-iam.html#security_iam_service-with-iam-roles-tempcreds<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_credentials_temp.html\">https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/id_credentials_temp.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/infrastructure-security.html\">https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/infrastructure-security.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.trendmicro.com\/cloudoneconformity-staging\/knowledge-base\/aws\/CloudTrail\/s3-bucket-object-lock-enabled.html\">https:\/\/www.trendmicro.com\/cloudoneconformity-staging\/knowledge-base\/aws\/CloudTrail\/s3-bucket-object-lock-enabled.html<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/cloudtrail-create-and-update-a-trail-by-using-the-aws-cli-update-trail.html\">https:\/\/docs.aws.amazon.com\/awscloudtrail\/latest\/userguide\/cloudtrail-create-and-update-a-trail-by-using-the-aws-cli-update-trail.html<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. CloudTrail is turned on by default and will store logs in the CloudTrail portal for 90 days. To extend the retention of the logs past 90 days, you need to configure a trail to send the logs to an S3 bucket. Additionally, you can also send the logs to CloudWatch to monitor your trail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[54,55,11],"tags":[53,56,27],"class_list":["post-2381","post","type-post","status-publish","format-standard","hentry","category-cloudtrail","category-cloudwatch","category-tutorials","tag-cloudtrail","tag-cloudwatch","tag-s3"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>8 Tips for AWS CloudTrail for security monitoring and best practices - maghilda<\/title>\n<meta name=\"description\" content=\"8 Tips for AWS CloudTrail for security monitoring and best practices\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"8 Tips for AWS CloudTrail for security monitoring and best practices - maghilda\" \/>\n<meta property=\"og:description\" content=\"8 Tips for AWS CloudTrail for security monitoring and best practices\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/\" \/>\n<meta property=\"og:site_name\" content=\"maghilda\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-10T22:21:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-10T22:25:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png\" \/>\n<meta name=\"author\" content=\"vibs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vibs\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/\"},\"author\":{\"name\":\"vibs\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#\\\/schema\\\/person\\\/21009c5e4f1817ea18c81d5004bcec1e\"},\"headline\":\"8 Tips for AWS CloudTrail for security monitoring and best practices\",\"datePublished\":\"2024-01-10T22:21:44+00:00\",\"dateModified\":\"2024-01-10T22:25:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/\"},\"wordCount\":1237,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Screen-Shot-2024-01-10-at-4.11.34-PM.png\",\"keywords\":[\"CloudTrail\",\"CloudWatch\",\"S3\"],\"articleSection\":[\"CloudTrail\",\"CloudWatch\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/\",\"url\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/\",\"name\":\"8 Tips for AWS CloudTrail for security monitoring and best practices - maghilda\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Screen-Shot-2024-01-10-at-4.11.34-PM.png\",\"datePublished\":\"2024-01-10T22:21:44+00:00\",\"dateModified\":\"2024-01-10T22:25:34+00:00\",\"description\":\"8 Tips for AWS CloudTrail for security monitoring and best practices\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Screen-Shot-2024-01-10-at-4.11.34-PM.png\",\"contentUrl\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/wp-content\\\/uploads\\\/2024\\\/01\\\/Screen-Shot-2024-01-10-at-4.11.34-PM.png\",\"width\":805,\"height\":760},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"8 Tips for AWS CloudTrail for security monitoring and best practices\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#website\",\"url\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/\",\"name\":\"maghilda.com\",\"description\":\"Technology blog focused on cloud computing, emerging technologies, software development and security.\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#organization\",\"name\":\"maghilda.com\",\"url\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/cropped-logo_red.png\",\"contentUrl\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/wp-content\\\/uploads\\\/2023\\\/12\\\/cropped-logo_red.png\",\"width\":512,\"height\":512,\"caption\":\"maghilda.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/#\\\/schema\\\/person\\\/21009c5e4f1817ea18c81d5004bcec1e\",\"name\":\"vibs\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/28233c799bf0736fecb2854057b69e52d9bd97b467b55be3406890936003faee?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/28233c799bf0736fecb2854057b69e52d9bd97b467b55be3406890936003faee?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/28233c799bf0736fecb2854057b69e52d9bd97b467b55be3406890936003faee?s=96&d=mm&r=g\",\"caption\":\"vibs\"},\"sameAs\":[\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\"],\"url\":\"https:\\\/\\\/www.maghilda.com\\\/staging\\\/9669\\\/author\\\/obliczte\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"8 Tips for AWS CloudTrail for security monitoring and best practices - maghilda","description":"8 Tips for AWS CloudTrail for security monitoring and best practices","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/","og_locale":"en_US","og_type":"article","og_title":"8 Tips for AWS CloudTrail for security monitoring and best practices - maghilda","og_description":"8 Tips for AWS CloudTrail for security monitoring and best practices","og_url":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/","og_site_name":"maghilda","article_published_time":"2024-01-10T22:21:44+00:00","article_modified_time":"2024-01-10T22:25:34+00:00","og_image":[{"url":"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png","type":"","width":"","height":""}],"author":"vibs","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vibs","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#article","isPartOf":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/"},"author":{"name":"vibs","@id":"https:\/\/www.maghilda.com\/staging\/9669\/#\/schema\/person\/21009c5e4f1817ea18c81d5004bcec1e"},"headline":"8 Tips for AWS CloudTrail for security monitoring and best practices","datePublished":"2024-01-10T22:21:44+00:00","dateModified":"2024-01-10T22:25:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/"},"wordCount":1237,"commentCount":0,"publisher":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/#organization"},"image":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#primaryimage"},"thumbnailUrl":"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png","keywords":["CloudTrail","CloudWatch","S3"],"articleSection":["CloudTrail","CloudWatch","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/","url":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/","name":"8 Tips for AWS CloudTrail for security monitoring and best practices - maghilda","isPartOf":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#primaryimage"},"image":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#primaryimage"},"thumbnailUrl":"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png","datePublished":"2024-01-10T22:21:44+00:00","dateModified":"2024-01-10T22:25:34+00:00","description":"8 Tips for AWS CloudTrail for security monitoring and best practices","breadcrumb":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#primaryimage","url":"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png","contentUrl":"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2024\/01\/Screen-Shot-2024-01-10-at-4.11.34-PM.png","width":805,"height":760},{"@type":"BreadcrumbList","@id":"https:\/\/www.maghilda.com\/staging\/9669\/8-tips-for-aws-cloudtrail-for-security-monitoring-and-best-practices\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.maghilda.com\/staging\/9669\/"},{"@type":"ListItem","position":2,"name":"8 Tips for AWS CloudTrail for security monitoring and best practices"}]},{"@type":"WebSite","@id":"https:\/\/www.maghilda.com\/staging\/9669\/#website","url":"https:\/\/www.maghilda.com\/staging\/9669\/","name":"maghilda.com","description":"Technology blog focused on cloud computing, emerging technologies, software development and security.","publisher":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.maghilda.com\/staging\/9669\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.maghilda.com\/staging\/9669\/#organization","name":"maghilda.com","url":"https:\/\/www.maghilda.com\/staging\/9669\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.maghilda.com\/staging\/9669\/#\/schema\/logo\/image\/","url":"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2023\/12\/cropped-logo_red.png","contentUrl":"https:\/\/www.maghilda.com\/staging\/9669\/wp-content\/uploads\/2023\/12\/cropped-logo_red.png","width":512,"height":512,"caption":"maghilda.com"},"image":{"@id":"https:\/\/www.maghilda.com\/staging\/9669\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.maghilda.com\/staging\/9669\/#\/schema\/person\/21009c5e4f1817ea18c81d5004bcec1e","name":"vibs","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/28233c799bf0736fecb2854057b69e52d9bd97b467b55be3406890936003faee?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/28233c799bf0736fecb2854057b69e52d9bd97b467b55be3406890936003faee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/28233c799bf0736fecb2854057b69e52d9bd97b467b55be3406890936003faee?s=96&d=mm&r=g","caption":"vibs"},"sameAs":["https:\/\/www.maghilda.com\/staging\/9669"],"url":"https:\/\/www.maghilda.com\/staging\/9669\/author\/obliczte\/"}]}},"_links":{"self":[{"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/posts\/2381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/comments?post=2381"}],"version-history":[{"count":5,"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/posts\/2381\/revisions"}],"predecessor-version":[{"id":2423,"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/posts\/2381\/revisions\/2423"}],"wp:attachment":[{"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/media?parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/categories?post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.maghilda.com\/staging\/9669\/wp-json\/wp\/v2\/tags?post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}