-
Notifications
You must be signed in to change notification settings - Fork 3
/
packaged.yaml
111 lines (110 loc) · 3.08 KB
/
packaged.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
AWSTemplateFormatVersion: '2010-09-09'
Description: 'This solution consists of a lambda functions which is used to fetch
logs from MongoDB Atlas and ingest to Sumo Logic.
'
Metadata:
AWS::ServerlessRepo::Application:
Author: Sumo Logic
Description: This solution consists of a lambda functions which is used to fetch
logs from MongoDB Atlas and ingest to Sumo Logic.
HomePageUrl: https://github.com/SumoLogic/sumologic-mongodb-atlas
Labels:
- lambda
- sumologic
- atlas
- serverless
- MongoDBAtlas
LicenseUrl: s3://appdevstore/MongoDBAtlas/v1.0.18/5122657d5b9a0d3713e24d3a33eae431
Name: sumologic-mongodb-atlas
ReadmeUrl: s3://appdevstore/MongoDBAtlas/v1.0.18/3088978c83fe207a640a2584aff2c79d
SemanticVersion: 1.0.18
SourceCodeUrl: https://github.com/SumoLogic/sumologic-mongodb-atlas
SpdxLicenseId: Apache-2.0
Outputs:
MongoDBAtlasFunction:
Description: MongoDBAtlasScheduler Function ARN
Value:
Fn::GetAtt:
- MongoDBAtlasFunction
- Arn
MongoDBAtlasTable:
Description: MongoDBAtlasTable DynamoDB Table Name
Value:
Ref: MongoDBAtlasTableResource
Parameters:
HttpLogsEndpoint:
Type: String
HttpMetricsEndpoint:
Type: String
OrganizationId:
Type: String
PrivateApiKey:
Type: String
ProjectId:
Type: String
PublicApiKey:
Type: String
Resources:
MongoDBAtlasFunction:
Properties:
CodeUri: s3://appdevstore/MongoDBAtlas/v1.0.18/5c5c3a5bfa0831572f5452a56ebc0b20
Environment:
Variables:
DBNAME:
Ref: MongoDBAtlasTableResource
ENABLE_CONSOLE_LOG: 'false'
ENVIRONMENT: aws
HTTP_LOGS_ENDPOINT:
Ref: HttpLogsEndpoint
HTTP_METRICS_ENDPOINT:
Ref: HttpMetricsEndpoint
ORGANIZATION_ID:
Ref: OrganizationId
PRIVATE_API_KEY:
Ref: PrivateApiKey
PROJECT_ID:
Ref: ProjectId
PUBLIC_API_KEY:
Ref: PublicApiKey
Events:
ScheduleRule:
Properties:
Schedule: rate(10 minutes)
Type: Schedule
Handler: main.main
MemorySize: 256
Policies:
- Statement:
- Action:
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:GetItem
- dynamodb:Scan
- dynamodb:Query
- dynamodb:DescribeTable
Effect: Allow
Resource:
Fn::GetAtt:
- MongoDBAtlasTableResource
- Arn
Version: '2012-10-17'
Runtime: python3.11
Timeout: 900
Type: AWS::Serverless::Function
Metadata:
SamResourceId: MongoDBAtlasFunction
MongoDBAtlasTableResource:
Properties:
AttributeDefinitions:
- AttributeName: key_col
AttributeType: S
KeySchema:
- AttributeName: key_col
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 30
WriteCapacityUnits: 20
Type: AWS::DynamoDB::Table
Metadata:
SamResourceId: MongoDBAtlasTableResource
Transform: AWS::Serverless-2016-10-31