-
Notifications
You must be signed in to change notification settings - Fork 2
/
newrelic-log-ingestion.yaml
42 lines (40 loc) · 1.26 KB
/
newrelic-log-ingestion.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Sends log data from CloudWatch Logs and S3 to New Relic Infrastructure (Cloud integrations) and New Relic Logging.
Parameters:
NewRelicLicenseKey:
Type: String
Description: Your NewRelic license key. You may omit it when deploying the function.
Default: "YOUR_LICENSE_KEY"
# Removed because of issue mentioned here:
# https://github.com/hashicorp/terraform-provider-aws/issues/55
# TODO: resolve it after issue is solved
# NoEcho: true
Bucket:
Type: String
Description: The bucket where the newrelic-log-ingestion.zip is placed
Key:
Type: String
Description: The key of newrelic-log-ingestion.zip
Resources:
NewRelicLogIngestionFunction:
Type: 'AWS::Serverless::Function'
Properties:
Runtime: python3.7
Handler: src/function.lambda_handler
CodeUri:
Bucket: !Ref Bucket
Key: !Ref Key
FunctionName: newrelic-log-ingestion
Timeout: 30
Environment:
Variables:
LICENSE_KEY: !Ref NewRelicLicenseKey
LOGGING_ENABLED: true
Outputs:
LambdaArn:
Description: The arn of the lambda
Value:
Fn::GetAtt:
- NewRelicLogIngestionFunction
- Arn