Service description
Amazon Web Services (AWS) provides on-demand cloud computing platforms and APIs to individuals and companies. Each available AWS service generates information related to different aspects of its functionality. The available data types include service events, audit events, metrics, and logs.
You can use the AWS collector to retrieve data from the AWS APIs and send it to your Devo domain. Once the gathered information arrives at Devo, it will be processed and included in different tables in the associated Devo domain so users can analyze it.
Data source description
From the monitoring point of view, AWS generates the following types of information:
Setup
Some manual actions are necessary in order to get all the required information/services and allow the Devo collector to gather the information from AWS.
The following sections describe how to get the required AWS credentials and how to proceed with the different required setups depending on the gathered information type.
Credentials
Because there are several options about how to create the credentials, they will be detailed only in two different approaches.
There are several available options to define credentials, but we will only cover some of them.
It’s recommended to have available or create the following IAM policies before the creation of the IAM user that will be used for the AWS collector.
Service events
All the service events that are generated on AWS are managed by Cloudwatch. However, Devo’s AWS collector offers two different services that collect Cloudwatch events:
sqs-cloudwatch-consumer
- This service is used to collect Security Hub events.service-events-all
-This service is used to collect events from the rest of the services on AWS.
The AWS services generate service events per region, so the next instructions should be applied in each region where the collecting of information is required (use the same values for all your configured regions).
In order to collect these service events, there are some structures that must be created: one FIFO queue in the SQS service and one Rule+Target in the CloudWatch service.
If the auto-setup functionality is enabled in the configuration and the related credentials have enough permissions to create all the required AWS structures, the following steps are not required.
For a manual creation of these required structures, follow the next steps (click to expand):
Audit events
No actions are required in the Cloudtrail service to retrieve this kind of information.
Metrics
No actions are required in the CloudWatch Metrics service to retrieve this kind of information.
Logs
Logs can be collected from different services. Depending on the service type, you may need to apply some settings on AWS:
CloudWatch Logs
No actions are required in this service to retrieve this kind of information.
VPC Flow Logs
Before enabling the generation of these logs, you must create one bucket in the S3 service and one FIFO queue in the SQS service. For a manual creation of these required structures, follow these steps (click to expand):
CloudFront Logs
Before enabling the generation of these logs, you must create one bucket in the S3 service and one FIFO queue in the SQS service. For a manual creation of these required structures, follow these steps (click to expand):
Collector service details
The following tables show details about the predefined services available to be used in the collector configuration.
Devo collector service name | Complete service name | CloudWatch filter used | CloudTrail source filter used | Metrics namespace used | Description | Service events | Audit events | Metrics | Logs |
---|---|---|---|---|---|---|---|---|---|
| All service events |
| N/A | N/A | This service will collect all service events information available in the CloudWatch service, no matter the source defined in the event. | ✓ | X | X | X |
| All audit events | N/A |
| N/A | This service will collect all audit events information available in the CloudTrail service, no matter the source defined in the event. | X | ✓ | X | X |
| All metrics | N/A | N/A |
| This service will collect all metric information from CloudWatch service. Metrics from all the available metric namespaces will be retrieved. | X | X | ✓ | X |
| CloudWatch Logs | N/A | N/A | N/A | This service will collect the different “Log Streams” that are part of a “Log Group” from the CloudWatch Logs service. Since it is common to have more than one “Log Group” defined, this will require creating one | X | X | X | ✓ |
| Non-CloudWatch Logs | N/A | N/A | N/A | This service will collect data from the following services VPC Flow Logs and CloudFront Logs. | X | X | X | ✓ |
| Service events generated by CloudWatch Events service | Check more info here. | N/A | N/A | This service will collect all Security Hub findings that have been sent to CloudWatch, no matter the source defined in the finding. | ✓ | X | X | X |
In the service-events-all
collector service, the <account_id>
string is automatically replaced with the real value.
The values entered in <cwl_custom>
must be unique values.
Collector configuration details
Depending on the data type chosen for collecting, the following service definitions could be added to the configuration inside the services section. The following are common properties that all services have:
regions
(mandatory) - It must be a list with valid target region names to be used when collecting data. One processing thread will be created per region. See more info about the available regions here.request_period_in_seconds
(optional) - The period in seconds to be used between pulling executions (default value: 60)pull_retries
(optional) - Number of retries that will be executed when a pulling error occurs (default value: 3)tag
(optional) - Used for sending the data to a table different from the default one (in the configuration examples, they appear as commented lines).
Global predefined services
These service definitions can be used for collecting in a global way the different data types available in AWS.
Service events
This is the configuration to be used when any service event needs to be collected from AWS, except Security Hub.
service-events-all: #tag: my.app.aws_service_events cloudwatch_sqs_queue_name: <queue_name> #auto_event_type: <bool> regions: - <region_a> - <region_b> - <region_c>
The default target table is cloud.aws.cloudwatch.events
This is the configuration to be used when Security Hub events need to be collected.
sqs-cloudwatch-consumer: #tag: <str> cloudwatch_sqs_queue_name: <queue_name> #auto_event_type: <bool> regions: - <region_a> - <region_b> - <region_c>
The SQS queue name is required
The default target table is cloud.aws.securityhub.findings
All audit events
There are two ways to get audit events. In case just a few events are going to be generated in the platform, using the API may be enough. However, when mid or high volumes are expected, saving those audit events in an S3 bucket would be the best choice. In this case, an SQS queue should be created to consume those events from the collector.
This is how the config file should be defined to retrieve audit events via API:
audit-events-all: #tag: <str with {placeholders}> #types: #- audits_api <str> #auto_event_type: <bool> #request_period_in_seconds: <int> #start_time: <datetime_iso8601_format> #drop_event_names: ["event1", "event2"] <list of str> regions: - <region_a> - <region_b> - <region_c>
Field | Type | Mandatory | Description |
---|---|---|---|
| string | no | Tag or tag format to be used. i.e.:
|
| list of strings (in yaml format) | no | Enable/Disable modules only when several modules per service are defined. To get audit events from API, this field should be set to |
| integer | no | Period in seconds used between each data pulling, this value will overwrite the default value (60 seconds) |
| datetime | no | Datetime from which to start collecting data. It must match ISO-8601 format. |
| boolean | no | Used to enable the auto categorization of message tagging. |
| list of strings | no | If the value in i.e. if this parameter is populated with the next values |
| list of strings (in yaml format) | yes, if defined in the “Collector definitions”. | Property name ( |
On the other hand, if S3 + SQS is the chosen option to get the audit events, the config file should match the following format:
audit-events-all: #tag: <str with {placeholders}> #types: #- audits_s3 <str> #request_period_in_seconds: <int> #start_time: <datetime_iso8601_format> #auto_event_type: <bool> audit_sqs_queue_name: <str> #s3_file_type_filter: <str (RegEx)> #use_region_and_account_id_from_event: <bool> regions: - region_a <str> - region_b <str> - region_c <str>
The default target table is cloud.aws.cloudwatch.events
Field | Type | Mandatory | Description |
---|---|---|---|
| string | no | Tag or tag format to be used. i.e.:
|
| list of strings (in yaml format) | no | Enable/Disable modules only when several modules per service are defined |
| integer | no | Period in seconds used between each data pulling, this value will overwrite the default value (60 seconds) |
| datetime | no | Datetime from which to start collecting data. It must match ISO-8601 format. |
| boolean | no | Used to enable the auto categorization of message tagging. |
| string | yes | Name of the SQS queue to read from. |
| string | no | RegEx to retrieve proper file type from S3 |
| bool | no | If |
| list of strings (in yaml format) | yes, if defined in the “Collector definitions”. | Property name ( |
All metrics
metrics-all: #tag: my.app.aws_metrics regions: - <region_a> - <region_b> - <region_c>
The default target table is cloud.aws.cloudwatch.metrics
CloudWatch Logs
An entry per Log Stream that wanted to be processed must be defined. In this example, two different entries have been created (cwl_1
, cwl_2
) for processing the Log Streams called /aws/log_stream_a
and /aws/log_stream_b
cwl_1: #tag: my.app.aws_cwl types: -logs log_group: /aws/log_stream_a regions: - <region_a> - <region_b> - <region_c> cwl_2: #tag: my.app.aws_cwl types: -logs log_group: /aws/log_stream_b regions: - <region_a> - <region_b> - <region_c>
As shown in the examples, the types list must be fixed with the log values.
The default target table is cloud.aws.cloudwatch.logs
Non-CloudWatch Logs
non-cloudwatch-logs: #tag: my.app.aws_cwl #vpcflowlogs_sqs_queue_name: <custom_queue_a> #cloudfront_sqs_queue_name: <custom_queue_b> #auto_event_type: <bool> regions: - <region_a> - <region_b> - <region_c>
The default target tables are cloud.aws.vpc.flowlogs and cloud.aws.cloudfront.
The default existing expected SQS queue names for this service are devo-ncwl-vpcfl-<short_unique_identifier>
and devo-ncwl-cfl-<short_unique_identifier>
The properties vpcflowlogs_sqs_queue_name
and cloudfrontlogs_sqs_queue_name
can be used for using custom queue names instead of the default expected ones
Run the collector
Once the data source is configured, you can send us the required information and we will host and manage the collector for you (Cloud collector), or you can host the collector in your own machine using a Docker image (On-premise collector).