brew tap isen-ng/dotnet-sdk-versions
brew cask install dotnet-sdk-2.2.400
I think it is a good option to have separate dev and prod services in separate folders so we cannot accidentally deploy to prod, that is a problem when relying on environment variables.
sls create --template aws-fsharp --path unicorn-dev --name unicorn
sls create --template aws-fsharp --path unicorn-prod --name unicorn
Our service can write to Kinesis, but only to the developer stream.
service:
name: unicorn-dev
app: unicorn-dev
org: lambdainsight
provider:
name: aws
runtime: dotnetcore2.1
stage: dev
region: eu-west-1
profile: unicorn-developer
apiKeys:
- unicorn-dev-key-v1
usagePlan:
quota:
limit: 1000
offset: 0
period: DAY
throttle:
burstLimit: 20
rateLimit: 5
iamRoleStatements:
- Effect: "Allow"
Action:
- "kinesis:PutRecord"
Resource: arn:aws:kinesis:eu-west-1:651831719661:stream/unicorn-dev
package:
artifact: bin/release/netcoreapp2.1/deploy-package.zip
exclude:
- serverless.yml
functions:
unicorn:
handler: FsharpHandlers::UnicornFsharp.Handler::unicorn
events:
- http:
path: /echo
method: get
private: false
cors: true
- http:
path: /unicorn
method: get
private: false
cors: true
- http:
path: /unicorn
method: post
private: false
cors: true