Skip to content

Commit

Permalink
refactor(Templates): Upgrade to avoid using deprecated functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrzesik committed Dec 29, 2020
1 parent ab8fd89 commit 3c5e497
Show file tree
Hide file tree
Showing 28 changed files with 87 additions and 72 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
service:
name: aws-alexa-typescript
service: aws-alexa-typescript # NOTE: update this with your service name

# app and org for use with dashboard.serverless.com
#app: your-app-name
#org: your-org-name
Expand All @@ -13,6 +13,7 @@ plugins:
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221

custom:
alexa:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ provider:
timeout: 300
memorySize: 1536
logRetentionInDays: 30
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -65,8 +66,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -60,22 +61,22 @@ functions:
hello:
handler: build/clojurescript/main/functions.hello
events:
- http:
path: hello
- httpApi:
path: /hello
method: get

now:
handler: build/clojurescript/main/functions.now
events:
- http:
path: now
- httpApi:
path: /now
method: get
# The following are a few example events you can configure
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
5 changes: 3 additions & 2 deletions lib/plugins/create/templates/aws-csharp/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: dotnetcore3.1
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -65,8 +66,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
5 changes: 3 additions & 2 deletions lib/plugins/create/templates/aws-fsharp/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: dotnetcore3.1
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -62,8 +63,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
13 changes: 7 additions & 6 deletions lib/plugins/create/templates/aws-go-dep/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: go1.x
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -58,22 +59,22 @@ functions:
hello:
handler: bin/hello
events:
- http:
path: hello
- httpApi:
path: /hello
method: get
world:
handler: bin/world
events:
- http:
path: world
- httpApi:
path: /world
method: get
# The following are a few example events you can configure
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
9 changes: 5 additions & 4 deletions lib/plugins/create/templates/aws-go-mod/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: go1.x
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -58,14 +59,14 @@ functions:
hello:
handler: bin/hello
events:
- http:
path: hello
- httpApi:
path: /hello
method: get
world:
handler: bin/world
events:
- http:
path: world
- httpApi:
path: /world
method: get
# The following are a few example events you can configure
# NOTE: Please make sure to change your handler code to work with those events
Expand Down
13 changes: 7 additions & 6 deletions lib/plugins/create/templates/aws-go/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: go1.x
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -58,22 +59,22 @@ functions:
hello:
handler: bin/hello
events:
- http:
path: hello
- httpApi:
path: /hello
method: get
world:
handler: bin/world
events:
- http:
path: world
- httpApi:
path: /world
method: get
# The following are a few example events you can configure
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
5 changes: 3 additions & 2 deletions lib/plugins/create/templates/aws-groovy-gradle/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: java8
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -59,8 +60,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
5 changes: 3 additions & 2 deletions lib/plugins/create/templates/aws-java-gradle/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: java8
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -59,8 +60,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
5 changes: 3 additions & 2 deletions lib/plugins/create/templates/aws-java-maven/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: java8
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -59,8 +60,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: java8
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -59,8 +60,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: java11
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -59,8 +60,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: java8
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -59,8 +60,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -55,8 +56,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ plugins:
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221

functions:
first:
handler: first.hello
second:
handler: second.hello
events:
- http:
- httpApi:
method: get
path: second
path: /second
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const serverlessConfiguration: AWS = {
environment: {
AWS_NODEJS_CONNECTION_REUSE_ENABLED: '1',
},
lambdaHashingVersion: '20201221',
},
functions: { hello }
}
Expand Down
5 changes: 3 additions & 2 deletions lib/plugins/create/templates/aws-nodejs/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
lambdaHashingVersion: 20201221

# you can overwrite defaults here
# stage: dev
Expand Down Expand Up @@ -64,8 +65,8 @@ functions:
# NOTE: Please make sure to change your handler code to work with those events
# Check the event documentation for details
# events:
# - http:
# path: users/create
# - httpApi:
# path: /users/create
# method: get
# - websocket: $connect
# - s3: ${env:BUCKET}
Expand Down
Loading

0 comments on commit 3c5e497

Please sign in to comment.