Cribl Stream for AWS CloudTrail on AWS
Partner Solution Deployment Guide
February 2023
Kam Amir, Cribl
Tony Bulding, AWS Integration & Automation team
Refer to the GitHub repository to view source files, report bugs, submit feature ideas, and post feedback about this Partner Solution. To comment on the documentation, refer to Feedback. |
This Partner Solution was created by Cribl in collaboration with Amazon Web Services (AWS). Partner Solutions are automated reference deployments that help people deploy popular technologies on AWS according to AWS best practices. If you’re unfamiliar with AWS Partner Solutions, refer to the AWS Partner Solution General Information Guide.
Overview
This Partner Solution deploys Cribl Stream for AWS CloudTrail on the AWS Cloud. If you are unfamiliar with AWS Quick Starts, refer to the AWS Quick Start General Information Guide.
Costs and licenses
This Quick Start requires a subscription to Cribl Stream Single Instance (Free) x86_64 on the AWS Marketplace.
There are no additional licenses required to use this Quick Start.
There is no cost to use this Quick Start, however you will be billed for the resources deployed. For more information refer to AWS Quick Start General Information Guide.
Architecture
Deploying this Quick Start for a new virtual private cloud (VPC) with default parameters builds the following Stream environment in the AWS Cloud.
As shown in Figure 1, the Quick Start sets up the following:
-
A highly available architecture that spans two Availability Zones in your virtual private cloud (VPC).
-
An Application Load Balancer to route Cribl Stream user traffic to Cribl Stream instances in the public subnets.
-
In the public subnets, Cribl Stream deployed to Amazon Elastic Compute Cloud (Amazon EC2) instances in an Auto Scaling group.*
-
Amazon S3 for two buckets: one for Cribl Stream test data and another for CloudTrail logs.
-
CloudTrail to log API calls to Cribl instances to an S3 bucket and send logging notifications to Amazon Simple Queue Service (Amazon SQS).
-
Amazon SQS to notify subscribers when logs are written to the CloudTrail S3 bucket.
-
AWS Lambda to empty the CloudTrail data S3 bucket upon stack deletion.
-
AWS Identity and Access Management (IAM) to provide the following:
-
Lambda function and CloudTrail access to the CloudTrail data S3 bucket.
-
Cribl Stream instances access to the Cribl Stream test data S3 bucket. You can edit the Cribl Stream IAM policy after deployment to add other Cribl-supported data sources and destinations.
-
* By default, to give users a better experience when getting started with Cribl Stream, this Partner Solution deploys in a public subnet. If you’re deploying this Partner Solution to a production environment, consider using a private subnet.
Deployment options
This Quick Start provides two deployment options:
-
Deploy Stream into a new VPC (ARM64) with CloudTrail. This option builds a new AWS environment consisting of the VPC, subnets, NAT gateways, security groups, bastion hosts, and other infrastructure components. It then deploys Stream into this new VPC.
-
Deploy Stream into a new VPC (x86) with CloudTrail. This option builds a new AWS environment consisting of the VPC, subnets, NAT gateways, security groups, bastion hosts, and other infrastructure components. It then deploys Stream into this new VPC.
The Quick Start provides separate templates for these options. It also lets you configure Classless Inter-Domain Routing (CIDR) blocks, instance types, and Stream settings.
Deployment steps
-
Sign in to your AWS account, and launch this Partner Solution, as described under Deployment options. The AWS CloudFormation console opens with a prepopulated template.
-
Choose the correct AWS Region, and then choose Next.
-
On the Create stack page, keep the default setting for the template URL, and then choose Next.
-
On the Specify stack details page, change the stack name if needed. Review the parameters for the template. Provide values for the parameters that require input. For all other parameters, review the default settings and customize them as necessary. When you finish reviewing and customizing the parameters, choose Next.
Unless you’re customizing the Partner Solution templates or are instructed otherwise in this guide’s Predeployment section, don’t change the default settings for the following parameters: QSS3BucketName
,QSS3BucketRegion
, andQSS3KeyPrefix
. Changing the values of these parameters will modify code references that point to the Amazon Simple Storage Service (Amazon S3) bucket name and key prefix. For more information, refer to the AWS Partner Solutions Contributor’s Guide. -
On the Configure stack options page, you can specify tags (key-value pairs) for resources in your stack and set advanced options. When you finish, choose Next.
-
On the Review page, review and confirm the template settings. Under Capabilities, select all of the check boxes to acknowledge that the template creates AWS Identity and Access Management (IAM) resources that might require the ability to automatically expand macros.
-
Choose Create stack. The stack takes about 15 minutes to deploy.
-
Monitor the stack’s status, and when the status is CREATE_COMPLETE, the Cribl Stream for AWS CloudTrail deployment is ready.
-
To view the created resources, choose the Outputs tab.
Postdeployment steps
Logging into the Cribl
Log in to Cribl Stream with the credential supplied in the nested CriblDeploy "Outputs" tab on your CloudFormation stack.
Adding other data sources and destinations
You can add data sources, such as Amazon Kinesis, Amazon Simple Queue Service (Amazon SQS), or Amazon S3, to the IAM policy that is included with the deployment. You must have the ARN and IAM policy requirements for any services that you to add. After editing the IAM policy, refer to the following links to integrate the added source or destination with Stream.
Data sources
Data destinations
Aditional resources
Troubleshooting
-
During deployment, you must select two Availability Zones or the deployment will fail.
-
You can use a git repository to backup your configurations. For more information, refer to GitOps on Cribl.
For troubleshooting common Quick Start issues visit the AWS Quick Start General Content Guide or the Troubleshooting CloudFormation page in the AWS documentation.
FAQ
Q. I encountered a CREATE_FAILED error when I launched the Quick Start.
A. If AWS CloudFormation fails to create the stack, relaunch the template with Rollback on failure set to Disabled. This setting is under Advanced in the AWS CloudFormation console on the Configure stack options page. With this setting, the stack’s state is retained, and the instance keeps running so that you can troubleshoot the issue. (For Windows, look at the log files in %ProgramFiles%\Amazon\EC2ConfigService
and C:\cfn\log
.)
When you set Rollback on failure to Disabled, you continue to incur AWS charges for this stack. Delete the stack when you finish troubleshooting. |
For more information, see Troubleshooting AWS CloudFormation.
Q. I encountered a size-limitation error when I deployed the AWS CloudFormation templates.
A. Launch the Quick Start templates from the links in this guide or from another S3 bucket. If you deploy the templates from a local copy on your computer or from a location other than an S3 bucket, you might encounter template-size limitations. For more information, see AWS CloudFormation quotas.
Q. Can I deploy this Quick Start in a different AWS Region other than the default (us-east-1)?
A. You can enter a different Region during deployment for the Quick Start S3 bucket Region
parameter. For any Quick Start to work in a Region other than its default Region, all the services it deploys must be supported in that Region. You can launch a Quick Start in any Region and see if it works. If you get an error such as Unrecognized resource type,
the Quick Start is not supported in that Region. For an up-to-date list of AWS Regions and the AWS services they support, see AWS Regional Services.
Q. Can I modify the EC2 IAM policy to include other S3 buckets, Kinesis streams, or other AWS resources for my instance to access?
A. Yes. For more information, refer to S3 and SQS Permissions and Amazon Kinesis Streams.
Q. Where can I find the Cribl URL output when I choose a deployment option into a new VPC?
A. Refer to the Cribl LogStream Web URL
output of the CloudFormation stack after deployment. To log in, use the Stream instance AMI ID as the password.
Q. After my instance was rebuilt by the Auto Scaling group, I can no longer log in to my instance. What’s the new password? A. When the Auto Scaling group rebuilds an instance, it resets the administrator password to the new instance’s AMI ID.
Customer responsibility
After you deploy a Partner Solution, confirm that your resources and services are updated and configured—including any required patches—to meet your security and other needs. For more information, refer to the Shared Responsibility Model.
Feedback
To submit feature ideas and report bugs, use the Issues section of the GitHub repository for this Partner Solution. To submit code, refer to the Partner Solution Contributor’s Guide. To submit feedback on this deployment guide, use the following GitHub links:
Notices
This document is provided for informational purposes only. It represents current AWS product offerings and practices as of the date of issue of this document, which are subject to change without notice. Customers are responsible for making their own independent assessment of the information in this document and any use of AWS products or services, each of which is provided "as is" without warranty of any kind, whether expressed or implied. This document does not create any warranties, representations, contractual commitments, conditions, or assurances from AWS, its affiliates, suppliers, or licensors. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers.
The software included with this paper is licensed under the Apache License, version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at https://aws.amazon.com/apache2.0/ or in the accompanying "license" file. This code is distributed on an "as is" basis, without warranties or conditions of any kind, either expressed or implied. Refer to the License for specific language governing permissions and limitations.