You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chore: Update edot cloud forwarder for AWS documentation (#455)
* Chore: Update edot cloud forwarder for AWS documentation
* Add a section for dashboards and remove references to not supported log formats
* refine documentation and add error replay section
Signed-off-by: Kavindu Dodanduwa <[email protected]>
* Set version of ga to v1
* Update format names
* Update versions and comment out sar
* Apply suggestions from code review
Co-authored-by: Miguel Luna <[email protected]>
* Update aws.md
* Update aws.md
---------
Signed-off-by: Kavindu Dodanduwa <[email protected]>
Co-authored-by: Kavindu Dodanduwa <[email protected]>
Co-authored-by: Fabrizio Ferri-Benedetti <[email protected]>
Co-authored-by: Miguel Luna <[email protected]>
{{edot-cf}} for AWS supports the following log sources:
22
22
23
-
|Log source | Description |
23
+
|AWS Service | Telemetry Description |
24
24
| --- | --- |
25
-
|VPC Flow |Logs generated by a Virtual Private Cloud (VPC)|
26
-
|ELB Access | Logs generated by an Elastic Load Balancer (ELB)|
25
+
|Virtual Private Cloud (VPC) |[VPC Flow Logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html) to capture information about IP traffic |
26
+
|Elastic Load Balancer (ELB) |[Access logs](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-access-logs.html) for your Application Load Balancer |
Read on to learn how to set up {{edot-cf}} for AWS.
@@ -64,6 +64,7 @@ To collect Elastic Load Balancer (ELB) Access logs, you need:
64
64
- Access logging enabled, with the bucket as the destination
65
65
66
66
:::
67
+
67
68
<!--
68
69
:::{tab-item} CloudWatch
69
70
@@ -93,8 +94,9 @@ Trim the API key from `Authorization=ApiKey MYKEYVALUE...` to just `MYKEYVALUE..
93
94
94
95
Before deploying {{edot-cf}} for AWS, keep these points in mind:
95
96
96
-
- Deploy a separate CloudFormation stack for each log type, for example VPC Flow Logs or ELB Logs. Each CloudFormation stack can only process one log source and format at a time.
97
+
- Deploy a separate CloudFormation stack for each log type, for example VPC Flow Logs or ELB Access Logs. Each CloudFormation stack can only process one log type and format at a time.
97
98
- Logs stored in S3 must be placed in separate buckets. Each log type should reside in its own dedicated bucket.
99
+
- The CloudFormation stack deployment region must match the region of the S3 bucket.
98
100
99
101
## Download the template [download-templates]
100
102
@@ -134,12 +136,13 @@ For S3 logs, use the following settings:
134
136
135
137
| Setting | Description |
136
138
| ------------------ | --- |
137
-
|`EdotCloudForwarderS3LogsType`| The encoding format for logs in the S3 bucket. Supported options:<br>- `vpc_flow_log`: VPC Flow logs<br>- `elb_access_log`: Elastic Load Balancer (ELB) Access logs<br>- `s3_access_log`: S3 Access logs<br>- `json`: JSON-formatted logs |
138
-
|`S3LogsJsonEncodingMode`|_(Required if `EdotCloudForwarderS3LogsType` is `json`)_<br>Defines how JSON logs are structured:<br>- `body`_(default)_: Stores logs in the request body<br>- `body_with_inline_attributes`: Logs include inline attributes |
139
+
|`EdotCloudForwarderS3LogsType`| The encoding format for logs in the S3 bucket. Supported options:<br>- `vpcflow`: VPC Flow Logs<br>- `elbaccess`: ELB Access logs|
139
140
|`SourceS3BucketARN`| Amazon Resource Name (ARN) of the S3 bucket where logs are stored. This bucket will trigger the `edot-cloud-forwarder` Lambda function automatically. |
141
+
% | `S3LogsJsonEncodingMode` | _(Required if `EdotCloudForwarderS3LogsType` is `json`)_<br>Defines how JSON logs are structured:<br>- `body`_(default)_: Stores logs in the request body<br>- `body_with_inline_attributes`: Logs include inline attributes |
140
142
141
143
::::
142
-
<!--
144
+
145
+
<!-- TODO: Enable when CloudWatch logs are supported
143
146
::::{tab-item} CloudWatch
144
147
145
148
For CloudWatch logs, use the following settings:
@@ -152,30 +155,34 @@ For CloudWatch logs, use the following settings:
152
155
The log group must already exist in your AWS account and region. If the ARN points to a non-existent log group, stack deployment or updates might fail.
153
156
:::
154
157
::::
158
+
155
159
-->
160
+
156
161
:::::
157
162
158
163
### Optional settings
159
164
160
165
These are optional settings you can set in the CloudFormation template:
161
166
162
-
| Setting | Description |
163
-
| ------------------- | --- |
164
-
|`EdotCloudForwarderTimeout`| Maximum execution time for the Lambda function, measured in seconds. Default value is `300` seconds. Minimum value is `1` second. Maximum value is `900` seconds. |
165
-
|`EdotCloudForwarderVersion`| Version of the EDOT Cloud Forwarder. Expected format is semantic versioning, for example `0.1.5`. Defaults to the latest available patch version. Don't change this value unless advised by Elastic Support. |
166
-
|`EdotCloudForwarderMemorySize`| Set the allocated memory for the Lambda function, measured in megabytes. Default value is `1024` MB. Minimum value is `128` MB. Maximum value is `10240` MB. |
167
-
|`EdotCloudForwarderConcurrentExecutions`| Set the maximum number of reserved concurrent executions for the Lambda function. Default value is `5`. Make sure this value doesn't exceed your AWS account's concurrency limit. |
|`EdotCloudForwarderTimeout`| Maximum execution time for the Lambda function, measured in seconds. Default value is `300` seconds. Minimum value is `1` second. Maximum value is `900` seconds. |
170
+
|`EdotCloudForwarderVersion`| Version of the EDOT Cloud Forwarder. Expected format is semantic versioning, for example `0.2.4`. Defaults to the latest available patch version. Don't change this value unless advised by Elastic Support. |
171
+
|`EdotCloudForwarderMemorySize`| Set the allocated memory for the Lambda function, measured in megabytes. Default value is `512` MB. Minimum value is `128` MB. Maximum value is `10240` MB. |
172
+
|`EdotCloudForwarderConcurrentExecutions`| Set the maximum number of reserved concurrent executions for the Lambda function. Default value is `5`. Make sure this value doesn't exceed your AWS account's concurrency limit. |
173
+
|`EdotCloudForwarderExporterMaxQueueSize`| Set the internal OTLP exporter queue size. Default is `50` MB. You may incease this based on the data volume. |
168
174
175
+
Default values of `EdotCloudForwarderMemorySize` and `EdotCloudForwarderConcurrentExecutions` are sufficient for most use cases. Key indications for the need of tuning these parameters are Lambda throttling and Lambda timeouts. Along with these, you might also need to adjust `EdotCloudForwarderExporterMaxQueueSize` to export higher data volumes.
169
176
170
177
## Deployment examples
171
178
172
-
The following examples use the CloudFormation template files hosted in the [public S3 bucket](#download-templates).
179
+
The following examples show how to deploy the ECF Cloud Forwarder using AWS CloudFormation. Copy and paste these commands after replacing the placeholder values with your actual configuration.
173
180
174
181
- Use the `--template-url` flag to reference a template hosted on S3.
175
182
- To always use the most recent stable templates, use the `latest` path. For example, `v0/latest`.
176
-
- To pin a specific version, replace `latest` with the desired version tag. For example, `v0/v0.1.5`.
183
+
- To pin a specific version, replace `latest` with the desired version tag. For example, `v0/v{{version.edot-cf-aws}}`.
177
184
178
-
Alternatively, if you have downloaded the template file, you can use the `--template-body file://<path>` option with a local template file.
185
+
Alternatively, if you have downloaded the template file, use the `--template-body file://<path>` option with a local template file.
Replace `aws-waf-logs-your-bucket-name` with your actual WAF logging bucket ARN. Remember that the bucket name must start with `aws-waf-logs-` as required by AWS WAF.
281
+
:::
282
+
::::
283
+
284
+
::::{tab-item} JSON logs
285
+
286
+
This example deploys a CloudFormation stack to collect JSON-formatted logs stored in an S3 bucket.
The `--capabilities CAPABILITY_NAMED_IAM` flag is required because this CloudFormation template creates AWS Identity and Access Management (IAM) resources. More specifically, it creates a named IAM role (`LambdaExecutionRole`) for the Lambda function. To acknowledge that AWS CloudFormation might create or modify IAM resources with custom names, you must specify the `CAPABILITY_NAMED_IAM` capability.
235
323
:::
236
-
-->
324
+
237
325
::::
238
326
:::::
239
327
@@ -315,6 +403,27 @@ You can deploy the stack manually using the AWS Management Console by following
315
403
6. Review your configuration and select **Submit** to deploy the stack.
316
404
7. Monitor the progress until the stack reaches the `CREATE_COMPLETE` state.
317
405
406
+
<!-- To be added at GA
407
+
## Deployment using the AWS Serverless Application Repository
408
+
409
+
In addition to deploying via CloudFormation templates, you can deploy the EDOT Cloud Forwarder application directly from the AWS Serverless Application Repository (SAR).
410
+
411
+
:::{note}
412
+
The same [deployment considerations](#deployment-considerations) apply to SAR deployments, including the requirement to deploy separate serverless applications for each log type and ensure the deployment region matches your S3 bucket region.
413
+
:::
414
+
415
+
To deploy from SAR, follow these steps:
416
+
417
+
1. Navigate to **AWS Serverless Application Repository** in the AWS Management Console.
418
+
2. Search for `edot-cloud-forwarder-s3-logs` and select the application.
419
+
3. Select **Deploy**.
420
+
4. **Configure the application settings**: You will be prompted to fill in the same parameters described in the [Required settings](#required-settings), [Log source settings](#log-source-settings), and [Optional settings](#optional-settings) sections. Refer to those sections for details on each parameter.
421
+
5. **Acknowledge IAM role creation**: At the bottom of the page, check the box to acknowledge that the application will create custom IAM roles. This is required for the forwarder to access your S3 bucket and send data to Elastic Observability.
422
+
6. Select **Deploy**.
423
+
424
+
The deployment process will start, and a CloudFormation stack will be created with all the necessary resources. You can monitor the progress in the AWS CloudFormation console under **Stacks**.
425
+
-->
426
+
318
427
## CloudFormation stack resources
319
428
320
429
The CloudFormation templates create a number of resources to process logs from a specific log source.
@@ -339,7 +448,10 @@ This is a list of resources created by the stack when processing S3 logs.
339
448
The main Lambda function, `LambdaFunction`, is the core component for processing S3 logs. S3 event notifications are handled dynamically using `CustomNotificationUpdater` and `NotificationUpdaterLambda`.
340
449
341
450
CloudWatch logs ensure detailed monitoring of Lambda executions. IAM roles and permissions control access between S3 and Lambda functions, while `S3FailureBucketARN` prevents data loss by capturing unprocessed logs.
342
-
<!--
451
+
452
+
453
+
<!-- TODO: Enable when CloudWatch logs are supported
454
+
343
455
### Resources for CloudWatch Logs
344
456
345
457
This is a list of resources created by the stack when CloudWatch logs are the source.
@@ -357,8 +469,61 @@ This is a list of resources created by the stack when CloudWatch logs are the so
357
469
The CloudWatch Log Subscription Filter, `CloudWatchLogSubscriptionFilter`, ensures logs are correctly forwarded to the Lambda function. The Lambda function, `LambdaFunction`, serves as the core processing unit for CloudWatch logs.
358
470
359
471
CloudWatch Log Groups help monitor execution performance and debug issues. IAM permissions (`LambdaExecutionRole`, `LambdaPermissionCloudWatch`) control interactions between CloudWatch and Lambda, while the failure bucket, `S3FailureBucketARN`, helps prevent data loss in case of processing errors.
472
+
360
473
-->
361
-
## **Delete a CloudFormation stack**
474
+
## Kibana integration setup
475
+
476
+
After {{edot-cf}} for AWS is successfully running and forwarding logs to Elastic Observability, install the {{kib}} integrations to visualize your data with out-of-the-box dashboards and visualizations.
477
+
478
+
To set up data visualization in {{kib}}:
479
+
480
+
1.Log into your Elastic Cloud deployment and open Kibana.
481
+
2. Go to **Management** → **Integrations** in the Kibana navigation menu.
482
+
3. Search for the appropriate integration based on your log type and install it:
| dryrun | Run the command without processing actual backup events. Useful to understand details about replaying error files from Lambda CloudWatch logs. | false |
517
+
| removeOnSuccess | Configure whether to remove error event from S3 error destination, if processing is successful. | true |
518
+
519
+
When successful, you should get `"StatusCode": 200` as the output. Check CloudWatch logs (resource `LambdaLogGroup`) for detailed logs.
520
+
521
+
:::{note}
522
+
With AWS CLI, you can use `--timeout` to increase currently configured Lambda timeout for custom invocations.
523
+
However, if a timeout occurs, you need to run the custom event multiple times to fully process all error events from the bucket.
524
+
:::
525
+
526
+
## Delete a CloudFormation stack
362
527
363
528
If you no longer need a deployed stack and want to clean up all associated resources, you can delete it using the following command:
0 commit comments