mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Added readme and updated yml conf
This commit is contained in:
parent
542c959080
commit
dd3ba770f6
37
docs/providers/aws/examples/hello-world/fsharp/README.md
Normal file
37
docs/providers/aws/examples/hello-world/fsharp/README.md
Normal file
@ -0,0 +1,37 @@
|
||||
<!--
|
||||
title: Hello World F# Example
|
||||
menuText: Hello World F# Example
|
||||
description: Create a F# Hello World Lambda function
|
||||
layout: Doc
|
||||
-->
|
||||
|
||||
# Hello World F# Example
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* Make sure `serverless` is installed. [See installation guide](../../../guide/installation.md).
|
||||
* [.Net Core 1.0.1 SDK](https://www.microsoft.com/net/download/core)
|
||||
* 1.1 isn't currently supported by AWS Lambda
|
||||
* [NodeJS v4 or higher](https://nodejs.org/en/)
|
||||
* An AWS Account
|
||||
|
||||
## Build and Package
|
||||
|
||||
From the root of this directory, run `build.cmd`, or `build.sh` if on Linux / Mac.
|
||||
|
||||
This will produce your deployment package at `bin/release/netcoreapp1.0/deploy-package.zip`.
|
||||
|
||||
## Deployment and Invocation
|
||||
|
||||
Once packaged, you can follow [these instructions](https://github.com/serverless/serverless#quick-start) to deploy and remotely invoke the function on AWS Lambda.
|
||||
|
||||
In short the commands you will need to run are (from the root of this directory):
|
||||
|
||||
```
|
||||
serverless config credentials --provider aws --key {YourAwsAccessKey} --secret {YourAwsSecret}
|
||||
serverless deploy -v
|
||||
serverless invoke -f hello -l
|
||||
serverless remove
|
||||
```
|
||||
|
||||
By default this template deploys to us-east-1, you can change that in "serverless.yml" under the `region: us-east-1` key.
|
||||
@ -46,14 +46,14 @@ provider:
|
||||
|
||||
# you can add packaging information here
|
||||
package:
|
||||
artifact: bin/Release/netcoreapp1.0/publish/deploy-package.zip
|
||||
artifact: bin/Release/netcoreapp1.0/deploy-package.zip
|
||||
# exclude:
|
||||
# - exclude-me.js
|
||||
# - exclude-me-dir/**
|
||||
|
||||
functions:
|
||||
hello:
|
||||
handler: FsharpHandlers::AwsDotnetFsharp.Handler::Hello
|
||||
handler: FsharpHandlers::AwsDotnetFsharp.Handler::hello
|
||||
|
||||
# The following are a few example events you can configure
|
||||
# NOTE: Please make sure to change your handler code to work with those events
|
||||
@ -66,6 +66,9 @@ functions:
|
||||
# - schedule: rate(10 minutes)
|
||||
# - sns: greeter-topic
|
||||
# - stream: arn:aws:dynamodb:region:XXXXXX:table/foo/stream/1970-01-01T00:00:00.000
|
||||
# - alexaSkill
|
||||
# - iot:
|
||||
# sql: "SELECT * FROM 'some_topic'"
|
||||
|
||||
# Define function environment variables here
|
||||
# environment:
|
||||
|
||||
@ -46,14 +46,14 @@ provider:
|
||||
|
||||
# you can add packaging information here
|
||||
package:
|
||||
artifact: bin/Release/netcoreapp1.0/publish/deploy-package.zip
|
||||
artifact: bin/Release/netcoreapp1.0/deploy-package.zip
|
||||
# exclude:
|
||||
# - exclude-me.js
|
||||
# - exclude-me-dir/**
|
||||
|
||||
functions:
|
||||
hello:
|
||||
handler: FsharpHandlers::AwsDotnetFsharp.Handler::Hello
|
||||
handler: FsharpHandlers::AwsDotnetFsharp.Handler::hello
|
||||
|
||||
# The following are a few example events you can configure
|
||||
# NOTE: Please make sure to change your handler code to work with those events
|
||||
@ -66,6 +66,9 @@ functions:
|
||||
# - schedule: rate(10 minutes)
|
||||
# - sns: greeter-topic
|
||||
# - stream: arn:aws:dynamodb:region:XXXXXX:table/foo/stream/1970-01-01T00:00:00.000
|
||||
# - alexaSkill
|
||||
# - iot:
|
||||
# sql: "SELECT * FROM 'some_topic'"
|
||||
|
||||
# Define function environment variables here
|
||||
# environment:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user