<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: splunk-logging lambda &amp;amp; Cloudwatch logs in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/626960#M107652</link>
    <description>&lt;P&gt;So the blueprint's code, written on Node.js, has some assumptions and wouldn't work without modification.&lt;/P&gt;&lt;P&gt;First of all in the given event there's no base64 encoding&lt;BR /&gt;Second, no gzip compression,&lt;BR /&gt;also there's no multiple events (CloudWatch trigger shoots once per event)&lt;/P&gt;&lt;P&gt;Long story short, try the "/services/collector/&lt;STRONG&gt;event&lt;/STRONG&gt;" HEC endpoint and this simplified code in index.js (understanding is much recommended)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; loggerConfig = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; url: process.env.SPLUNK_HEC_URL,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; token: process.env.SPLUNK_HEC_TOKEN,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; SplunkLogger = require(&lt;/SPAN&gt;&lt;SPAN&gt;'./lib/mysplunklogger'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; logger = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; SplunkLogger(loggerConfig);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;exports.handler = (event, context, callback) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; console.log(&lt;/SPAN&gt;&lt;SPAN&gt;'Received event:'&lt;/SPAN&gt;&lt;SPAN&gt;, JSON.stringify(event, &lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; parsed = JSON.parse(JSON.stringify(event,&lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; count = &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Log event to Splunk with explicit event timestamp.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Use optional 'context' argument to send Lambda metadata e.g. awsRequestId, functionName.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Change "item.timestamp" below if time is specified in another field in the event.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Change to "logger.log(item.message, context)" if no time field is present in event. */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;//logger.logWithTime(parsed.timestamp, item.message, context);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Alternatively, UNCOMMENT logger call below if you want to override Splunk input settings */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Log event to Splunk with any combination of explicit timestamp, index, source, sourcetype, and host.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Complete list of input settings available at &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector&lt;/A&gt; */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logger.logEvent({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;time: &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; Date(parsed.time).getTime() / &lt;/SPAN&gt;&lt;SPAN&gt;1000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;host: parsed.source, &lt;/SPAN&gt;&lt;SPAN&gt;//'serverless',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;source: &lt;/SPAN&gt;&lt;SPAN&gt;`lambda:&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;context.functionName&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sourcetype: &lt;/SPAN&gt;&lt;SPAN&gt;'aws:cloudwatchlogs:yoursourcetype'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// &amp;nbsp; &amp;nbsp; index: 'main',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;event: parsed.detail,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Send all the events in a single batch to Splunk&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logger.flushAsync((error, response) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (error) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callback(error);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&lt;/SPAN&gt;&lt;SPAN&gt;`Response from Splunk:\n&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&lt;/SPAN&gt;&lt;SPAN&gt;`Successfully processed &lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; log event(s).`&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callback(&lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;, count); &lt;/SPAN&gt;&lt;SPAN&gt;// Return number of log events&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 12 Jan 2023 17:40:06 GMT</pubDate>
    <dc:creator>pashfw</dc:creator>
    <dc:date>2023-01-12T17:40:06Z</dc:date>
    <item>
      <title>Does anyone have an updated Lambda function for handling splunk-logging lambda &amp; Cloudwatch logs?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381143#M95389</link>
      <description>&lt;P&gt;I have deployed a Lambda function from the "splunk logging" blueprint for collecting VPC Flow logs and Cloudwatch events.&lt;/P&gt;
&lt;P&gt;Its working well however in addition to the VPC Flow Logs, I'm receiving thousands of cloudwatch events that are unreadable because the awslogs.data is being sent through using compression and Base64.&lt;/P&gt;
&lt;P&gt;Does anyone have an updated Lambda function for handling these?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 16:37:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381143#M95389</guid>
      <dc:creator>pobrien</dc:creator>
      <dc:date>2022-12-19T16:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381144#M95390</link>
      <description>&lt;P&gt;You will need to use the blueprints for Cloudwatch logs and not the generic Splunk logging function. There are two, one in python and the other in node.js; both will take the data from CloudWatch Logs and decompress the files and send them into Splunk using HEC.  Here is a &lt;A href="https://www.splunk.com/blog/2017/02/03/how-to-easily-stream-aws-cloudwatch-logs-to-splunk.html"&gt;blog&lt;/A&gt; that can help you. I’ve also put together some docs / &lt;A href="https://github.com/amiracle/cooking_with_Splunk_and_AWS"&gt;workshops&lt;/A&gt; that can help as well. &lt;/P&gt;

&lt;P&gt;Once you replace the function, the data should start to flow in normally. &lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 17:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381144#M95390</guid>
      <dc:creator>amiracle</dc:creator>
      <dc:date>2019-03-27T17:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381145#M95391</link>
      <description>&lt;P&gt;The name of the function is CloudWatch Log processor (&lt;A href="https://github.com/splunk/splunk-aws-serverless-apps/tree/master/splunk-cloudwatch-logs-processor"&gt;https://github.com/splunk/splunk-aws-serverless-apps/tree/master/splunk-cloudwatch-logs-processor&lt;/A&gt;). &lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 17:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381145#M95391</guid>
      <dc:creator>amiracle</dc:creator>
      <dc:date>2019-03-27T17:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381146#M95392</link>
      <description>&lt;P&gt;this blueprint shows the error to me.  I verified the token and URL to be correct with curl command and its' fine.&lt;BR /&gt;
the error is as below:&lt;/P&gt;

&lt;P&gt;START RequestId: 831062c6-f1cf-427f-b115-fd3bd7c07g93 Version: $LATEST&lt;/P&gt;

&lt;P&gt;2019-04-03T16:41:01.704Z    831062c6-f1cf-427f-b115-fd3bd7c07t73    Received event: { "version": "0", "id": "b3cb20eb-f86e-2952-3ad1-a86b1e9e0ft9", "detail-type": "Scheduled Event", "source": "aws.events", "account": "xxxxxxxxxx", "time": "2019-04-03T16:37:27Z", "region": "us-east-1", "resources": [ "arn:aws:events:us-east-1:xxxxxxxx:rule/testsplunk" ], "detail": {} }&lt;/P&gt;

&lt;P&gt;2019-04-03T16:41:01.705Z    831062c6-f1cf-427f-b115-fd3bd7c07t73    TypeError: Cannot read property 'data' of undefined at exports.handler (/var/task/index.js:34:45)&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2019 08:34:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381146#M95392</guid>
      <dc:creator>radhas58</dc:creator>
      <dc:date>2019-04-04T08:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381147#M95393</link>
      <description>&lt;P&gt;Hello, i am getting the same error. I just add the blueprint for cloudwatch and when making a test i get:&lt;/P&gt;

&lt;P&gt;TypeError: Cannot read property 'data' of undefined&lt;BR /&gt;
at exports.handler (/var/task/index.js:34:45)&lt;/P&gt;

&lt;P&gt;any help on that?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 11:38:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/381147#M95393</guid>
      <dc:creator>bernardoortega</dc:creator>
      <dc:date>2019-04-18T11:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/525447#M95394</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;I'm using the Lambda-Python blueprint for processing clouduwatch logs (not a VPC flow logs).&lt;/P&gt;&lt;P&gt;My shard size in Kinesis Data stream is as 2.&lt;/P&gt;&lt;P&gt;The problem I'm facing now is, the lambda wasn't processing the entire logs. Instead, I'm getting some errors like (&lt;STRONG&gt;ProvisionedThroughputExceededException&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;We are receiving a logs from 15+ AWS-Accounts to the kinesis stream.&lt;/P&gt;&lt;P&gt;I require a solution to overcome this issue in a deadly manner.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2020 19:41:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/525447#M95394</guid>
      <dc:creator>joshva0894</dc:creator>
      <dc:date>2020-10-19T19:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/531905#M95395</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If you are trying to test the splunk-cloudwatch-logs-processor lambda function, the default test event will fail with "Cannot read property 'data' of undefined". We had the same problem when trying to set this up for the first time. We discovered that the lambda function is expecting the json from CloudWatch and not the default test event. The CloudWatch json has a data field that the function decodes from base64. Replacing the test event with the json below should work as a test.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "awslogs": {
    "data": "QVdTIGxvZyBjb250ZW50"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 18:35:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/531905#M95395</guid>
      <dc:creator>jschroederevers</dc:creator>
      <dc:date>2020-12-03T18:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/624742#M107386</link>
      <description>&lt;P&gt;Hi amiracle,&amp;nbsp; you previously said in your post "&lt;SPAN&gt;You will need to use the blueprints for Cloudwatch logs and not the generic Splunk logging function. There are two, one in python and the other in node.js;&amp;nbsp;&lt;/SPAN&gt;"&lt;BR /&gt;However I cannot find anywhere the on in python. Only nodejs is offered for Lambda functions. Would it be possible to get the latest source code of this blueprint in Python (&lt;A&gt;Send CloudWatch logs to a Splunk host)&lt;/A&gt;?&lt;BR /&gt;&lt;BR /&gt;The reason for this is mainly that I need to integrate systems managers parameters and secrets asynchronously within the blueprint which is an issue I can't figure out in nodejs. Hopefully I will be in Python.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Regards&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 16:17:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/624742#M107386</guid>
      <dc:creator>sbombardier</dc:creator>
      <dc:date>2022-12-19T16:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/626646#M107630</link>
      <description>&lt;P&gt;Obviously the payload doesn't contain any "data" anymore as script is expecting.&lt;/P&gt;&lt;P&gt;Did anybody find a better script since then?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 18:21:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/626646#M107630</guid>
      <dc:creator>pashfw</dc:creator>
      <dc:date>2023-01-10T18:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/626655#M107631</link>
      <description>&lt;P&gt;index.js:31&lt;/P&gt;&lt;P&gt;// CloudWatch Logs data is base64 encoded so decode here&lt;BR /&gt;const payload = Buffer.from(event.awslogs.data, 'base64');&lt;/P&gt;&lt;P&gt;It doesn't look like encoded actually&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 19:06:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/626655#M107631</guid>
      <dc:creator>pashfw</dc:creator>
      <dc:date>2023-01-10T19:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: splunk-logging lambda &amp; Cloudwatch logs</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/626960#M107652</link>
      <description>&lt;P&gt;So the blueprint's code, written on Node.js, has some assumptions and wouldn't work without modification.&lt;/P&gt;&lt;P&gt;First of all in the given event there's no base64 encoding&lt;BR /&gt;Second, no gzip compression,&lt;BR /&gt;also there's no multiple events (CloudWatch trigger shoots once per event)&lt;/P&gt;&lt;P&gt;Long story short, try the "/services/collector/&lt;STRONG&gt;event&lt;/STRONG&gt;" HEC endpoint and this simplified code in index.js (understanding is much recommended)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; loggerConfig = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; url: process.env.SPLUNK_HEC_URL,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; token: process.env.SPLUNK_HEC_TOKEN,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; SplunkLogger = require(&lt;/SPAN&gt;&lt;SPAN&gt;'./lib/mysplunklogger'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; logger = &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; SplunkLogger(loggerConfig);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;exports.handler = (event, context, callback) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; console.log(&lt;/SPAN&gt;&lt;SPAN&gt;'Received event:'&lt;/SPAN&gt;&lt;SPAN&gt;, JSON.stringify(event, &lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;const&lt;/SPAN&gt;&lt;SPAN&gt; parsed = JSON.parse(JSON.stringify(event,&lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;let&lt;/SPAN&gt;&lt;SPAN&gt; count = &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Log event to Splunk with explicit event timestamp.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Use optional 'context' argument to send Lambda metadata e.g. awsRequestId, functionName.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Change "item.timestamp" below if time is specified in another field in the event.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Change to "logger.log(item.message, context)" if no time field is present in event. */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;//logger.logWithTime(parsed.timestamp, item.message, context);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Alternatively, UNCOMMENT logger call below if you want to override Splunk input settings */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;/* Log event to Splunk with any combination of explicit timestamp, index, source, sourcetype, and host.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Complete list of input settings available at &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/RESTREF/RESTinput#services.2Fcollector&lt;/A&gt; */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logger.logEvent({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;time: &lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;SPAN&gt; Date(parsed.time).getTime() / &lt;/SPAN&gt;&lt;SPAN&gt;1000&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;host: parsed.source, &lt;/SPAN&gt;&lt;SPAN&gt;//'serverless',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;source: &lt;/SPAN&gt;&lt;SPAN&gt;`lambda:&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;context.functionName&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sourcetype: &lt;/SPAN&gt;&lt;SPAN&gt;'aws:cloudwatchlogs:yoursourcetype'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// &amp;nbsp; &amp;nbsp; index: 'main',&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;event: parsed.detail,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Send all the events in a single batch to Splunk&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logger.flushAsync((error, response) &lt;/SPAN&gt;&lt;SPAN&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (error) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callback(error);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&lt;/SPAN&gt;&lt;SPAN&gt;`Response from Splunk:\n&lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; console.log(&lt;/SPAN&gt;&lt;SPAN&gt;`Successfully processed &lt;/SPAN&gt;&lt;SPAN&gt;${&lt;/SPAN&gt;&lt;SPAN&gt;count&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; log event(s).`&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; callback(&lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;, count); &lt;/SPAN&gt;&lt;SPAN&gt;// Return number of log events&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jan 2023 17:40:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Does-anyone-have-an-updated-Lambda-function-for-handling-splunk/m-p/626960#M107652</guid>
      <dc:creator>pashfw</dc:creator>
      <dc:date>2023-01-12T17:40:06Z</dc:date>
    </item>
  </channel>
</rss>

