View AWS Network Firewall logs and metrics by using Splunk
Created by Ivo Pinto
Summary
Many organizations use Splunk Enterprise
To achieve this, you create a read-only AWS Identity and Access Management (IAM) role. Splunk Add-On for AWS uses this role to access CloudWatch. You configure the Splunk Add-On for AWS to fetch metrics and logs from CloudWatch. Finally, you create visualizations in Splunk from the retrieved log data and metrics.
Prerequisites and limitations
Prerequisites
A Splunk
account A Splunk Enterprise instance, version 8.2.2 or later
An active AWS account
Network Firewall, set up and configured to send logs to CloudWatch Logs
Limitations
Splunk Enterprise must be deployed as a cluster of Amazon Elastic Compute Cloud (Amazon EC2) instances in the AWS Cloud.
Collecting data by using an automatically discovered IAM role for Amazon EC2 is not supported in the AWS China Regions.
Architecture

The diagram illustrates the following:
Network Firewall publishes logs to CloudWatch Logs.
Splunk Enterprise retrieves metrics and logs from CloudWatch.
To populate example metrics and logs in this architecture, a workload generates traffic that passes through the Network Firewall endpoint to go to the internet. This is achieved by the use of route tables. Although this pattern uses a single Amazon EC2 instance as the workload, this pattern can apply to any architecture as long as Network Firewall is configured to send logs to CloudWatch Logs.
This architecture also uses a Splunk Enterprise instance in another virtual private cloud (VPC). However, the Splunk instance can be in another location, such as in the same VPC as the workload, as long as it can reach the CloudWatch APIs.
Tools
AWS services
Amazon CloudWatch Logs helps you centralize the logs from all your systems, applications, and AWS services so you can monitor them and archive them securely.
Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the AWS Cloud. You can launch as many virtual servers as you need and quickly scale them up or down.
AWS Network Firewall is a stateful, managed, network firewall and intrusion detection and prevention service for VPCs in the AWS Cloud.
Other tools
Splunk
helps you monitor, visualize, and analyze log data.
Epics
Task | Description | Skills required |
---|---|---|
Create the IAM policy. | Follow the instructions in Creating policies using the JSON editor to create the IAM policy that grants read-only access to the CloudWatch Logs data and CloudWatch metrics. Paste the following policy into the JSON editor.
| AWS administrator |
Create a new IAM role. | Follow the instructions in Creating a role to delegate permissions to an AWS service to create the IAM role that the Splunk Add-On for AWS uses to access CloudWatch. For Permissions policies, choose the policy that you created previously. | AWS administrator |
Assign the IAM role to the EC2 instances in the Splunk cluster. |
| AWS administrator |
Task | Description | Skills required |
---|---|---|
Install the add-on. |
| Splunk administrator |
Configure the AWS credentials. |
For more information, see Find an IAM role within your Splunk platform instance | Splunk administrator |
Task | Description | Skills required |
---|---|---|
Configure the retrieval of Network Firewall logs from CloudWatch Logs. |
By default, Splunk fetches the log data every 10 minutes. This is a configurable parameter under Advanced Settings. For more information, see Configure a CloudWatch Logs input using Splunk Web | Splunk administrator |
Configure the retrieval of Network Firewall metrics from CloudWatch. |
By default, Splunk fetches the metric data every 5 minutes. This is a configurable parameter under Advanced Settings. For more information, see Configure a CloudWatch input using Splunk Web | Splunk administrator |
Task | Description | Skills required |
---|---|---|
View the top source IP addresses. |
| Splunk administrator |
View packet statistics. |
| Splunk administrator |
View the most-used source ports. |
| Splunk administrator |
Related resources
AWS documentation
Creating a role to delegate permissions to an AWS service (IAM documentation)
Creating IAM policies (IAM documentation)
Logging and monitoring in AWS Network Firewall (Network Firewall documentation)
Route table configurations for AWS Network Firewall (Network Firewall documentation)
AWS blog posts
AWS Marketplace