CloudWatch
This guide provides step-by-step instructions for integrating your Amazon Web Services (AWS) CloudWatch logs with slaOS. This integration allows slaOS to collect metrics, logs, and other critical data necessary to monitor your AWS environment effectively.
The app.rated.co interface guides you step-by-step, all the way through to a successful Cloudwatch integration!
Prerequisites
Before you begin, ensure you have the following:
An active AWS account with administrative access
Access to AWS Identity and Access Management (IAM)
Your slaOS account credentials
Integration Steps
Step 1: Creating an AWS IAM Policy
To enable slaOS to access your CloudWatch logs, you need to create an AWS IAM policy with the necessary permissions.
Log into AWS Management Console: Navigate to the IAM service.
Create a New Policy: Use the JSON editor and paste the following policy document:
Name the Policy: Assign a name such as
RatedSLIQueryAccessPolicy
.Review and Create: Complete the policy creation process.
Step 2: Creating an AWS IAM User
Next, create an IAM user to associate with the slaOS integration.
Navigate to IAM Users: In the IAM console, click on "Users" in the left sidebar, then select "Add user."
Configure User Details:
Choose a username (e.g.,
RatedIntegrationUser
).Select "Access key - Programmatic access" for the AWS access type.
Attach the Policy:
On the permissions page, select "Attach existing policies directly."
Search for and select the
RatedSLIQueryAccessPolicy
created earlier.
Finalize User Creation: Review and create the user.
Step 3: Generating and Managing Access Keys
Once the user is created, generate the access keys necessary for slaOS to access your logs.
Download the Access Keys: On the "Success" page, download the CSV file containing the access key ID and secret access key.
Missed Download? If you missed this step, you can generate a new secret access key for the IAM user later via the IAM console.
Step 4: Submitting keys to slaOS
After generating your AWS access keys, the next step is to add these credentials to slaOS for verification:
During the onboarding process in the slaOS user interface, you'll be prompted to enter your AWS credentials.
Input your AWS Access Key ID and Secret Access Key in the designated fields.
The slaOS system will automatically verify your credentials to ensure they have the necessary permissions.
Depending on your integration needs, slaOS will verify access to logs, metrics, or both.
Step 5: Selecting Log Groups and Streams
For slaOS to effectively query and parse your logs, it is essential to define the correct scopes. Scopes determine which parts of your log data will be accessible to slaOS, including the following:
Log Groups: Specify the CloudWatch log groups that should be included.
Log Streams: Define the log streams within each group that contain relevant data. It is not mandatory to specify this.
Step 6: Using CloudWatch Filter Patterns (Optional)
When setting up your CloudWatch logs for slaOS, you may want to use CloudWatch's native filter_pattern
tool to filter logs. This tool allows you to specify which logs should be included based on your defined patterns.
slaOS does not verify the validity of the filter_pattern
you provide. You are fully responsible for ensuring that your filter_pattern
is correctly configured according to CloudWatch's native log filtering rules. Incorrect patterns may lead to missed log data or improper parsing.
Frequently Asked Questions (FAQ)
Can I restrict access to specific log groups or regions?
Yes: You can modify the Resource
field in the IAM policy. For example:
To restrict access to a specific region:
"arn:aws:logs:us-west-2:*:*"
To restrict access to specific log groups:
"arn:aws:logs:*:*:log-group:/aws/lambda/my-function:*"
What happens if I need to rotate my AWS access keys?
Generate new access keys in the AWS IAM console and update them in your slaOS integration settings. Ensure you delete the old keys after confirming the new ones work.
How often does slaOS collect data from CloudWatch?
slaOS collects data in near real-time, typically with a delay of a few minutes depending on CloudWatch's own latency.
Is it safe to use the ingestion_key
in logs?
ingestion_key
in logs?The ingestion_key
is not an API key or bearer token and does not provide access to other slaOS functionalities. While it has limited access, it's important to understand its security implications:
Don't Worry: If you're using the slaOS-managed cloud version, security measures are already in place to protect your ingestion_key
. You don't need to handle these concerns directly.
slaOS manages:
Built-in rate limiting and anomaly detection
Isolation of your environment
Key rotation as needed
You rarely need to handle or log the ingestion_key
directly, further reducing any risk.
For any additional questions or issues, please contact the slaOS support team on Slack.
Last updated