Update third-party-solutions.md

pull/1387/head
noramullen1 2020-07-15 14:44:14 -07:00 committed by Scott Anderson
parent 6347bc14a6
commit c76331a00d
1 changed files with 41 additions and 2 deletions

View File

@ -17,11 +17,50 @@ A number of third-party technologies can be configured to send line protocol dir
## AWS Lambda
CloudFormation is AWS infrastructure as code service that lets you define almost any AWS component in a configuration file. The result is a service that provides a concrete, repeatable definition of your environment that can prove useful in many scenarios. For example, if someone accidentally deletes your Simple Queue Service topic or an EC2 instance, you can easily recreate them by running your CloudFormation template.
### Pt. 1
identifying data source he wants to periodically tap into and pull into influx. Written a script or has something that can grab data and turn into line protocol.
The template in this example pulls data from the [United States Geological Survey (USGS)](https://www.usgs.gov/) every hour and writes it to InfluxDB.
### Pt 2.
And grabs it at recurring intervals. AWS has something built in to do this. Then it outputs the line protocol into one or more influx targets.
### Pt 3.
### Deploy the template
Cloud formation — script his code and how he got it into lambda and how to package up and deploy it.
Now that we have explored the template, lets deploy it.
1. Log into your free AWS account and search for the CloudFormation service. Make sure youre in the AWS region you want to deploy the Lambda to.
2. Click **Create Stack**.
3. In the **Prerequisite - Prepare Template** section, select **Template is ready**.
4. In the **Specify template** section:
- Under **Template source**, select **Amazon S3 URL**.
- In the **Amazon S3 URL** field, enter the following URL: `https://influxdata-lambda.s3.amazonaws.com/GeoLambda.yml`
5. Click **Next**.
6. Enter a name in the **Stack name** field.
7. Enter the following InfluxDB details:
- Organization ID
- Bucket ID of the bucket the Lambda writes to
- Token with permission to write to the bucket
- InfluxDB URL
8. Do not alter or add to any other fields. Click **Next**.
9. Select the **I acknowledge that AWS CloudFormation might create IAM resources** check box.
10. Click **Create Stack**.
After a few minutes, the stack deploys to your region. To view the new Lambda, select **Services > AWS Lambda**. On the Lambda functions page, you should see your new Lambda. The `CopyZipsFunction` is the helper copy function, and the `GeoPythonLambda` does the data collection and writing work:
<img>
`GeoPythonLambda` should run every hour based on the AWS Rule we set up, but you should test and confirm it works.
1. Click `GeoPythonLambda`, and then click **Test**.
2. The test requires an input definition, but this Lambda has no input requirements, so click through and save the default dataset.
3. If the test is successful, a green **Execution result: succeeded** message appears.
With the data points written, when you log into your InfluxDB UI, youll be able to explore the geolocation earthquake data:
<img>