Skip to Content

Optimizing FSx for ONTAP Audit Log Delivery with AWS Lambda

1 June 2026 by
TechStora

Introduction to FSx for ONTAP Audit Log Delivery

Delivering audit logs from FSx for ONTAP to Splunk can be resource-intensive when utilizing traditional EC2-based architectures. These setups often involve multiple EC2 instances, such as syslog-ng servers and Splunk Universal Forwarders, leading to operational overhead and high costs. In contrast, a serverless approach using AWS Lambda and EventBridge offers significant advantages in terms of cost efficiency and scalability.

This article explores how replacing the existing EC2-based architecture with a Lambda-based solution achieves a staggering 90% reduction in AWS infrastructure costs while maintaining the same Splunk index and SPL queries. The discussion also highlights the process for migration, ensuring zero data loss during the transition phase.

Challenges of EC2-Based Architectures

Although functional, EC2-based solutions for FSx for ONTAP audit log delivery come with substantial operational burdens. For instance, maintaining EC2 instances requires regular OS patching and manual updates to agents like syslog-ng and Splunk Universal Forwarder. Moreover, scaling these instances to handle varying log volumes demands manual intervention, which can be time-consuming and prone to errors.

Another drawback is the lack of built-in redundancy. Without additional configurations, the architecture is limited to a single availability zone, exposing it to potential risks of downtime. Furthermore, the time required to provision, configure, and deploy such an architecture often spans several hours, making it less efficient for modern DevOps practices.

The Lambda-Based Serverless Solution

The Lambda-based approach leverages S3 Access Points for log storage, AWS EventBridge for triggering log processing, and AWS Lambda for executing the log transformation and forwarding logic. This architecture eliminates the need for persistent infrastructure, reducing operational complexity and cost.

With this setup, audit logs are periodically written to S3, and EventBridge triggers a Lambda function every five minutes. The Lambda function processes the logs by parsing JSON or EVTX formats, converting them into Splunk HTTP Event Collector (HEC) events, and sending them to the Splunk endpoint using an authorization token. Checkpoints are stored in AWS Systems Manager (SSM) Parameter Store to ensure no data is lost during processing.

Cost and Operational Efficiency

One of the most significant advantages of the Lambda-based architecture is its cost-effectiveness. The monthly AWS infrastructure cost drops from $66 to just $6, representing a 90% reduction. This is achieved by replacing fixed-cost EC2 instances with pay-per-use Lambda functions. Moreover, the serverless model eliminates the need for OS patching, agent updates, and manual scaling, further reducing the operational burden.

In terms of availability, AWS Lambda operates in a multi-AZ configuration by default, ensuring higher resilience. Additionally, deploying this serverless solution using CloudFormation takes only about 30 minutes, compared to the hours required for setting up an EC2-based system.

Handling High Volume Scenarios

For use cases with sustained high event volumes, a Lambda-to-Kinesis Data Firehose pipeline is recommended. This alternative path can handle up to 1,000 events per second, thanks to Kinesis Data Firehose's built-in Splunk destination. The architecture involves using Lambda to transform the log data before passing it to Firehose, which then delivers the data to Splunk HEC.

To deploy this high-volume solution, a separate CloudFormation template named firehose.yaml is provided. This setup ensures that the system can scale seamlessly to accommodate spikes in log volume without requiring manual intervention.

Zero Data Loss Migration Strategy

Migrating from an EC2-based architecture to a Lambda-based solution can be achieved with a parallel deployment strategy to ensure zero data loss. This involves deploying the serverless stack alongside the existing EC2 pipeline and using a separate Splunk index for validation during the transition.

The migration process typically spans three days. On Day 1, the serverless stack is deployed using a CloudFormation template named splunk-serverless-template.yaml. During Days 2 and 3, the logs processed by both architectures are compared, and once the serverless solution is validated, the EC2-based setup is decommissioned.

Conclusion

Adopting a Lambda-based solution for FSx for ONTAP audit log delivery significantly reduces infrastructure costs and operational complexity. By shifting from EC2-based setups to serverless architectures, organizations can achieve enhanced scalability, reliability, and cost efficiency. While the Splunk licensing costs remain constant, the operational savings and simplified management make this approach highly attractive for businesses looking to modernize their logging infrastructure.

With the added flexibility for high-volume scenarios via Kinesis Data Firehose, this solution is well-suited for a wide range of use cases. The outlined migration strategy ensures a smooth transition with zero data loss, making it a practical choice for organizations already using EC2-based Splunk integrations.