File tree Expand file tree Collapse file tree 6 files changed +113
-0
lines changed Expand file tree Collapse file tree 6 files changed +113
-0
lines changed Original file line number Diff line number Diff line change
1
+ [* .{yml,yaml,json} ]
2
+ indent_style = space
3
+ indent_size = 2
4
+
5
+ [* .js ]
6
+ indent_style = space
7
+ indent_size = 4
Original file line number Diff line number Diff line change
1
+ .DS_Store
2
+ node_modules
3
+ .serverless
4
+ npm-debug.log
Original file line number Diff line number Diff line change
1
+ // https://github.com/jshint/jshint/blob/master/examples/.jshintrc
2
+ {
3
+ "node" : true ,
4
+ "mocha" : true ,
5
+ "esversion" : 6
6
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "key3" : " value3" ,
3
+ "key2" : " value2" ,
4
+ "key1" : " value1"
5
+ }
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ // Your first function handler
4
+ module . exports . hello = ( event , context , cb ) => {
5
+ const body = {
6
+ message : 'Go Serverless v1.0! Your function executed successfully!' ,
7
+ input : event ,
8
+ } ;
9
+
10
+ const response = {
11
+ statusCode : 200 ,
12
+ headers : {
13
+ 'custom-header' : 'Custom header value' ,
14
+ } ,
15
+ body : JSON . stringify ( body ) ,
16
+ } ;
17
+
18
+ cb ( null , response ) ;
19
+ } ;
20
+
21
+ // You can add more handlers here, and reference them in serverless.yml
Original file line number Diff line number Diff line change
1
+ # Welcome to Serverless!
2
+ #
3
+ # This file is the main config file for your service.
4
+ # It's very minimal at this point and uses default values.
5
+ # You can always add more config options for more control.
6
+ # We've included some commented out config examples here.
7
+ # Just uncomment any of them to get that config option.
8
+ #
9
+ # For full config options, check the docs:
10
+ # docs.serverless.com
11
+ #
12
+ # Happy Coding!
13
+
14
+ service : my-idp # NOTE: update this with your service name
15
+
16
+ provider :
17
+ name : aws
18
+ runtime : nodejs4.3
19
+
20
+ # you can overwrite defaults here
21
+ # stage: dev
22
+ # region: us-east-1
23
+
24
+ # you can add statements to the Lambda function's IAM Role here
25
+ # iamRoleStatements:
26
+ # - Effect: "Allow"
27
+ # Action:
28
+ # - "s3:ListBucket"
29
+ # Resource: { "Fn::Join" : ["", ["arn:aws:s3:::", { "Ref" : "ServerlessDeploymentBucket" } ] ] }
30
+ # - Effect: "Allow"
31
+ # Action:
32
+ # - "s3:PutObject"
33
+ # Resource:
34
+ # Fn::Join:
35
+ # - ""
36
+ # - - "arn:aws:s3:::"
37
+ # - "Ref" : "ServerlessDeploymentBucket"
38
+
39
+ # you can add packaging information here
40
+ # package:
41
+ # include:
42
+ # - include-me.js
43
+ # exclude:
44
+ # - exclude-me.js
45
+ # artifact: my-service-code.zip
46
+
47
+ functions :
48
+ hello :
49
+ handler : handler.hello
50
+
51
+ # you can add any of the following events
52
+ # events:
53
+ # - http:
54
+ # path: users/create
55
+ # method: get
56
+ # - s3: ${env:BUCKET}
57
+ # - schedule: rate(10 minutes)
58
+ # - sns: greeter-topic
59
+
60
+ # you can add CloudFormation resource templates here
61
+ # resources:
62
+ # Resources:
63
+ # NewResource:
64
+ # Type: AWS::S3::Bucket
65
+ # Properties:
66
+ # BucketName: my-new-bucket
67
+ # Outputs:
68
+ # NewOutput:
69
+ # Description: "Description for the output"
70
+ # Value: "Some output value"
You can’t perform that action at this time.
0 commit comments