github.com/mweagle/Sparta@v1.15.0/docs/reference/eventsources/index.xml (about) 1 <?xml version="1.0" encoding="utf-8" standalone="yes"?> 2 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 3 <channel> 4 <title>Sparta - AWS Lambda Microservices</title> 5 <link>/reference/eventsources/</link> 6 <description>Recent content on Sparta - AWS Lambda Microservices</description> 7 <generator>Hugo -- gohugo.io</generator> 8 <language>en-US</language> 9 <lastBuildDate>Wed, 09 Mar 2016 19:56:50 +0100</lastBuildDate> 10 11 <atom:link href="/reference/eventsources/index.xml" rel="self" type="application/rss+xml" /> 12 13 14 <item> 15 <title>CodeCommit</title> 16 <link>/reference/eventsources/codecommit/</link> 17 <pubDate>Thu, 31 Jan 2019 05:44:32 +0000</pubDate> 18 19 <guid>/reference/eventsources/codecommit/</guid> 20 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to CodeCommit Events. 21 Goal Assume that we&rsquo;re supposed to write a Lambda function that is triggered in response to any event emitted by a CodeCommit repository. 22 Getting Started Our lambda function is relatively short: 23 import ( awsLambdaEvents &#34;github.com/aws/aws-lambda-go/events&#34; ) func echoCodeCommit(ctx context.Context, event awsLambdaEvents.CodeCommitEvent) (interface{}, error) { logger, _ := ctx.Value(sparta.ContextKeyRequestLogger).(*logrus.Entry) logger.WithFields(logrus.Fields{ &#34;Event&#34;: event, }).Info(&#34;Event received&#34;) return &amp;event, nil } Our lambda function doesn&rsquo;t need to do much with the repository message other than log and return it.</description> 24 </item> 25 26 <item> 27 <title>CloudFormation</title> 28 <link>/reference/eventsources/cloudformation/</link> 29 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 30 31 <guid>/reference/eventsources/cloudformation/</guid> 32 <description> TODO: CloudFormation source documentation 33 </description> 34 </item> 35 36 <item> 37 <title>CloudWatch Events</title> 38 <link>/reference/eventsources/cloudwatchevents/</link> 39 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 40 41 <guid>/reference/eventsources/cloudwatchevents/</guid> 42 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to different types of CloudWatch Events. This overview is based on the SpartaApplication sample code if you&rsquo;d rather jump to the end result. 43 Goal Assume that we&rsquo;re supposed to write a simple &ldquo;HelloWorld&rdquo; CloudWatch event function that has two requirements: 44 Run every 5 minutes to provide a heartbeat notification to our alerting system via a logfile entry Log EC2-related events for later processing Getting Started The lambda function is relatively small:</description> 45 </item> 46 47 <item> 48 <title>CloudWatch Logs</title> 49 <link>/reference/eventsources/cloudwatchlogs/</link> 50 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 51 52 <guid>/reference/eventsources/cloudwatchlogs/</guid> 53 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to CloudWatch Logs. This overview is based on the SpartaApplication sample code if you&rsquo;d rather jump to the end result. 54 Goal Assume that we&rsquo;re supposed to write a simple &ldquo;HelloWorld&rdquo; CloudWatch Logs function that should be triggered in response to any log message issued to a specific Log Group. 55 Getting Started Our lambda function is relatively short:</description> 56 </item> 57 58 <item> 59 <title>Cognito</title> 60 <link>/reference/eventsources/cognito/</link> 61 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 62 63 <guid>/reference/eventsources/cognito/</guid> 64 <description> TODO: Cognito source documentation 65 </description> 66 </item> 67 68 <item> 69 <title>DynamoDB</title> 70 <link>/reference/eventsources/dynamodb/</link> 71 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 72 73 <guid>/reference/eventsources/dynamodb/</guid> 74 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to DynamoDB stream events. This overview is based on the SpartaApplication sample code if you&rsquo;d rather jump to the end result. 75 Goal Assume that we&rsquo;re given a DynamoDB stream. See below for details on how to create the stream. We&rsquo;ve been asked to write a lambda function that logs when operations are performed to the table so that we can perform offline analysis.</description> 76 </item> 77 78 <item> 79 <title>Kinesis</title> 80 <link>/reference/eventsources/kinesis/</link> 81 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 82 83 <guid>/reference/eventsources/kinesis/</guid> 84 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to Amazon Kinesis streams. This overview is based on the SpartaApplication sample code if you&rsquo;d rather jump to the end result. 85 Goal The goal of this example is to provision a Sparta lambda function that logs Amazon Kinesis events to CloudWatch logs. 86 Getting Started We&rsquo;ll start with an empty lambda function and build up the needed functionality.</description> 87 </item> 88 89 <item> 90 <title>S3</title> 91 <link>/reference/eventsources/s3/</link> 92 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 93 94 <guid>/reference/eventsources/s3/</guid> 95 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to S3 events. This overview is based on the SpartaImager sample code if you&rsquo;d rather jump to the end result. 96 Goal Assume we have an S3 bucket that stores images. You&rsquo;ve been asked to write a service that creates a duplicate image that includes a characteristic stamp overlay and store it in the same S3 bucket. 97 Getting Started We&rsquo;ll start with an empty lambda function and build up the needed functionality.</description> 98 </item> 99 100 <item> 101 <title>SES</title> 102 <link>/reference/eventsources/ses/</link> 103 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 104 105 <guid>/reference/eventsources/ses/</guid> 106 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to inbound email. This overview is based on the SpartaApplication sample code if you&rsquo;d rather jump to the end result. 107 Goal Assume that we have already verified our email domain with AWS. This allows our domain&rsquo;s email to be handled by SES. 108 We&rsquo;ve been asked to write a lambda function that logs inbound messages, including the metadata associated with the message body itself.</description> 109 </item> 110 111 <item> 112 <title>SNS</title> 113 <link>/reference/eventsources/sns/</link> 114 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 115 116 <guid>/reference/eventsources/sns/</guid> 117 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to SNS events. This overview is based on the SpartaApplication sample code if you&rsquo;d rather jump to the end result. 118 Goal Assume that we have an SNS topic that broadcasts notifications. We&rsquo;ve been asked to write a lambda function that logs the Subject and Message text to CloudWatch logs for later processing. 119 Getting Started We&rsquo;ll start with an empty lambda function and build up the needed functionality.</description> 120 </item> 121 122 <item> 123 <title>SQS</title> 124 <link>/reference/eventsources/sqs/</link> 125 <pubDate>Wed, 09 Mar 2016 19:56:50 +0100</pubDate> 126 127 <guid>/reference/eventsources/sqs/</guid> 128 <description>In this section we&rsquo;ll walkthrough how to trigger your lambda function in response to AWS Simple Queue Service (SQS) events. This overview is based on the SpartaSQS sample code if you&rsquo;d rather jump to the end result. 129 Goal The goal here is to create a self-contained service that provisions a SQS queue, an AWS Lambda function that processes messages posted to the queue 130 Getting Started We&rsquo;ll start with an empty lambda function and build up the needed functionality.</description> 131 </item> 132 133 </channel> 134 </rss>