Splunk® Supported Add-ons

Splunk Add-on for AWS

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Configure Config inputs for the Splunk Add-on for AWS

Complete the steps to configure Config inputs for the Splunk Add-on for Amazon Web Services (AWS):

  1. You must manage accounts for the add-on as a prerequisite. See Manage accounts for the Splunk Add-on for AWS.
  2. Configure AWS services for the Config input.
  3. Configure AWS permissions for the Config input. You can skip this step and configure AWS permissions at once, if you prefer. See Configure AWS permissions for all Splunk Add-on for AWS inputs at once.
  4. Configure Config inputs either through Splunk Web or configuration files.

Best practices for configuring inputs

  • Configure Simple Queue Service (SQS)-based S3 inputs to collect AWS data.
  • Configure an AWS Config input for the Splunk Add-on for Amazon Web Services on your data collection node through Splunk Web. This data source is available only in a subset of AWS regions, which does not include China. See http://docs.aws.amazon.com/general/latest/gr/rande.html#awsconfig_region for a full list of supported regions.
  • Configure a single enabled Config modular input for each unique SQS. Multiple enabled modular inputs can cause conflicts when trying to delete SQS messages or S3 records that another modular input is attempting to access and parse.
  • Disable or delete testing configurations before releasing your configuration in production.

Configure AWS services for the Config input

The Splunk Add-on for AWS collects events from a SQS that subscribes to the Simple Notification Service (SNS) notification events from AWS Config. Configure AWS Config to produce SNS notifications, and then create the SQS that the add-on can access. See http://aws.amazon.com/config/.

  1. Enable AWS Config. See http://docs.aws.amazon.com/config/latest/developerguide/setting-up.html.
  2. Specify a new S3 bucket to save the data and an SNS Topic to which Splunk software streams Config notifications. Do not use an existing bucket or SNS.
  3. Verify that you completed the setup process. If you used the AWS console, the Resource Lookup page displays.
  4. Create a new SQS.
  5. Subscribe the SQS exclusively to the SNS Topic that you created.
  6. Grant IAM permissions to access the S3 bucket and SQS to the AWS account that the add-on uses to connect to your AWS environment.


Configure AWS permissions for the Config input

Set the following permissions in your AWS configuration:

  • For the S3 bucket that collects your Config logs:
    • GetObject
    • GetBucketLocation
    • ListBucket
    • ListAllMyBuckets
  • For the SQS subscribed to the SNS Topic that collects Config notifications:
    • GetQueueAttributes
    • ListQueues
    • ReceiveMessage
    • GetQueueUrl
    • SendMessage
    • DeleteMessage
  • For the Config snapshots: DeliverConfigSnapshot
  • For the IAM user to get the Config snapshots: GetUser

See the following sample inline policy to configure Config input permissions:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow", 
            "Action": [
                "s3:ListBucket",
                "s3:GetObject",
                "s3:GetBucketLocation",
                "s3:ListAllMyBuckets"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow", 
            "Action": [
                "sqs:ListQueues",
                "sqs:ReceiveMessage",
                "sqs:GetQueueAttributes",
                "sqs:SendMessage",
                "sqs:GetQueueUrl",
                "sqs:DeleteMessage"
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "config:DeliverConfigSnapshot" 
            ],
            "Resource": [
                "*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "iam:GetUser"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}

For more information and sample policies, see the following AWS documentation:

Configure a Config input using Splunk Web

To configure inputs using Splunk Web:

  1. Click Splunk Add-on for AWS in the navigation bar on Splunk Web home.
  2. Click Create New Input > Config > Config.
  3. Fill out the fields as described in the table:
Field in Splunk Web Description
AWS Account The AWS account or EC2 IAM role the Splunk platform uses to access your Config data. In Splunk Web, select an account from the drop-down list.
AWS Region The AWS region that contains the log notification SQS queue. Enter the region ID. See http://docs.aws.amazon.com/general/latest/gr/rande.html#d0e371.
SQS queue name The name of the queue to which AWS sends new Config notifications. Select a queue from the drop-down list, or enter the queue name manually. The queue name is the final segment of the full queue URL. For example, if your SQS queue URL is http://sqs.us-east-1.amazonaws.com/123456789012/testQueue, then your SQS queue name is testQueue.
Source type A source type for the events. Enter a value only if you want to override the default of aws:config. Event extraction relies on the default value of source type. If you change the default value, you must update props.conf as well.

The Splunk platform indexes AWS Config events using three variations of this source type:

  • Configuration snapshots are indexed as sourcetype=aws:config.
  • Configuration change notifications are indexed as sourcetype=aws:config:notification.
  • Logs from aws_config.log are indexed as sourcetype=aws:config:log.
Index The index name where the Splunk platform puts the Config data. The default is main.
Interval The number of seconds to wait before the Splunk platform runs the command again. The default is 30 seconds.

Configure a Config input using configuration files

To configure inputs manually in inputs.conf, create a stanza using the following template and add it to $SPLUNK_HOME/etc/apps/Splunk_TA_aws/local/inputs.conf. If the file or path does not exist, create it.

[aws_config://<name>]
aws_account = <value>
aws_region = <value>
sqs_queue = <value>
interval = <value>
sourcetype = <value>
index = <value>

Some of these settings have default values that can be found in $SPLUNK_HOME/etc/apps/Splunk_TA_aws/default/inputs.conf:

[aws_config]
aws_account =
sourcetype = aws:config
queueSize = 128KB
persistentQueueSize = 24MB
interval = 30 

The previous values correspond to the default values in Splunk Web as well as some internal values that are not exposed in Splunk Web for configuration. If you choose to copy this stanza to /local and use it as a starting point to configure your inputs.conf manually, change the stanza title from aws_config to aws_config://<name> and add the additional parameters that you need.

Last modified on 08 October, 2020
PREVIOUS
Configure Cost and Usage Report inputs for the Splunk Add-on for AWS
  NEXT
Configure Config Rules inputs for the Splunk Add-on for AWS

This documentation applies to the following versions of Splunk® Supported Add-ons: released


Was this documentation topic helpful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters