Skip to content

Commit

Permalink
all example README files updated
Browse files Browse the repository at this point in the history
  • Loading branch information
xf10w committed Oct 19, 2018
1 parent ce34fcd commit 19024bd
Show file tree
Hide file tree
Showing 61 changed files with 651 additions and 257 deletions.
11 changes: 11 additions & 0 deletions aws-golang-simple-http-endpoint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
title: TODO
description: TODO
layout: Doc
framework: v1
platform: AWS
language: Go
authorLink: 'https://github.com/sebito91'
authorName: 'Sebastian Borza'
authorAvatar: 'https://avatars0.githubusercontent.com/u/3159454?v=4&s=140'
-->
12 changes: 9 additions & 3 deletions aws-java-simple-http-endpoint/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Simple HTTP Endpoint example in Java
description: This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you ping it, it will reply with the current time.
title: 'AWS Simple HTTP Endpoint example in Java'
description: 'This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you ping it, it will reply with the current time.'
layout: Doc
framework: v1
platform: AWS
language: Java
authorLink: 'https://github.com/DoWhileGeek'
authorName: 'Joeseph Rodrigues'
authorAvatar: 'https://avatars3.githubusercontent.com/u/1767769?v=4&s=140'
-->
# Simple HTTP Endpoint Example

Expand Down Expand Up @@ -131,7 +137,7 @@ The expected result should be similar to:
}
--------------------------------------------------------------------
START RequestId: XXXXXXX Version: $LATEST
2017-01-04 23:44:37 <XXXXXXX> INFO com.serverless.Handler:18 - received: {}
2004 23:44:37 <XXXXXXX> INFO com.serverless.Handler:18 - received: {}
END RequestId: XXXXXXX
REPORT RequestId: XXXXXXX Duration: 0.51 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 53 MB
```
Expand Down
11 changes: 11 additions & 0 deletions aws-multiple-runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
title: TODO
description: TODO
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/christophgysin'
authorName: 'Christoph Gysin'
authorAvatar: 'https://avatars0.githubusercontent.com/u/527924?v=4&s=140'
-->
28 changes: 17 additions & 11 deletions aws-node-alexa-skill/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Serverless Alexa Skill example in NodeJS
description: This example demonstrates how to setup your own Alexa skill using AWS Lambdas.
title: 'AWS Serverless Alexa Skill example in NodeJS'
description: 'This example demonstrates how to setup your own Alexa skill using AWS Lambdas.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/rupakg'
authorName: 'Rupak Ganguly'
authorAvatar: 'https://avatars0.githubusercontent.com/u/8188?v=4&s=140'
-->
# Serverless Alexa Skill Example

Expand Down Expand Up @@ -49,11 +55,11 @@ functions:

Next we need to setup an Alexa skill. Once you've signed up for the Amazon Developer Platform visit `https://developer.amazon.com/edw/home.html`. There you should see the following screen:

![Welcome](https://cloud.githubusercontent.com/assets/223045/21183285/8403b37c-c207-11e6-89c0-d36582010af8.png)
![Welcome](https://cloud.githubusercontent.com/assets/223045/21183285/8403b37c-c211e6-89c0-d36582010af8.png)

Next click on `Add a new Skill`:

![Add Skill](https://cloud.githubusercontent.com/assets/223045/21183286/84051262-c207-11e6-8422-945b6b45e83b.png)
![Add Skill](https://cloud.githubusercontent.com/assets/223045/21183286/840512c211e6-84945b6b45e83b.png)

Go through the steps and fill in all the required fields e.g. Intent Schema and Sample Utterances:

Expand Down Expand Up @@ -82,19 +88,19 @@ GetLuckyNumbers what are my lucky numbers lower than {UpperLimit}
GetLuckyNumbers tell me my lucky numbers lower than {UpperLimit}
```

![Skill Information](https://cloud.githubusercontent.com/assets/223045/21183279/83eec480-c207-11e6-841b-d8925f0804a5.png)
![Interaction Model](https://cloud.githubusercontent.com/assets/223045/21183280/83ef3d84-c207-11e6-87a5-bb8dcbb903f8.png)
![Skill Information](https://cloud.githubusercontent.com/assets/223045/21183279/83eec4c211e6-841b-d8925f0804a5.png)
![Interaction Model](https://cloud.githubusercontent.com/assets/223045/21183280/83ef3dc211e6-87a5-bb8dcbb903f8.png)

Fill in the Lambda ARN which was printed or run `serverless info` to retrieve the ARN again.

![Configuration](https://cloud.githubusercontent.com/assets/223045/21183281/83f17086-c207-11e6-89b7-2f6d96ac559c.png)
![Configuration](https://cloud.githubusercontent.com/assets/223045/21183281/83f170c211e6-89b7-2f6d96ac559c.png)

Next up visit the test page, fill in the utterance and click on `Ask LuckyNumbers`.

![Test](https://cloud.githubusercontent.com/assets/223045/21183283/83f1f632-c207-11e6-858d-41b1a3154e91.png)
![Test](https://cloud.githubusercontent.com/assets/223045/21183282/83f1f628-c207-11e6-974e-b7c051ffb6eb.png)
![Test](https://cloud.githubusercontent.com/assets/223045/21183284/83f708ac-c207-11e6-8199-9489e8f3e494.png)
![Test](https://cloud.githubusercontent.com/assets/223045/21185805/78c1df06-c212-11e6-9cf9-ce44edc30cdd.gif)
![Test](https://cloud.githubusercontent.com/assets/223045/21183283/83f1f6c211e6-858d-41b1a3154e91.png)
![Test](https://cloud.githubusercontent.com/assets/223045/21183282/83f1f6c211e6-974e-b7c051ffb6eb.png)
![Test](https://cloud.githubusercontent.com/assets/223045/21183284/83f708ac-c211e6-819489e8f3e494.png)
![Test](https://cloud.githubusercontent.com/assets/223045/21185805/78c1dfc211e6-9cf9-ce44edc30cdd.gif)

You should have received a response containing the text `Your lucky number is` followed by your lucky number :)

Expand Down
10 changes: 8 additions & 2 deletions aws-node-auth0-cognito-custom-authorizers-api/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: API Gateway Authorizer Function for Auth0 or AWS Cognito using RS256 JSON Web Key Sets tokens.
description: Authorize your API Gateway with either Auth0 or Cognito JWKS RS256 tokens.
title: 'API Gateway Authorizer Function for Auth0 or AWS Cognito using RS256 JSON Web Key Sets tokens.'
description: 'Authorize your API Gateway with either Auth0 or Cognito JWKS RS256 tokens.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/shahzeb1'
authorName: 'Shahzeb K.'
authorAvatar: 'https://avatars2.githubusercontent.com/u/1383831?v=4&s=140'
-->
# API Gateway Authorizer Function for Auth0 or AWS Cognito using the [JWKS](https://auth0.com/docs/jwks) method.

Expand Down
10 changes: 8 additions & 2 deletions aws-node-auth0-custom-authorizers-api/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS API Gateway Custom Authorizer Function with Auth0 example in NodeJS
description: This is an example of how to protect API endpoints with Auth0, JSON Web Tokens (jwt) and a custom authorizer lambda function.
title: 'AWS API Gateway Custom Authorizer Function with Auth0 example in NodeJS'
description: 'This is an example of how to protect API endpoints with Auth0, JSON Web Tokens (jwt) and a custom authorizer lambda function.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/erezrokah'
authorName: 'Erez Rokah'
authorAvatar: 'https://avatars0.githubusercontent.com/u/26760571?v=4&s=140'
-->
# API Gateway Custom Authorizer Function + Auth0

Expand Down
13 changes: 12 additions & 1 deletion aws-node-dynamodb-backup/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
<!--
title: TODO
description: TODO
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/kaihendry'
authorName: 'Kai Hendry'
authorAvatar: 'https://avatars3.githubusercontent.com/u/765871?v=4&s=140'
-->
# DynamoDB stream events to AWS S3

Which effectively creates a **backup of your dynamoDB table** assuming an event
was caught for every record. Hint: [Introduce a new field
"backedup"](https://s.natalian.org/2017-06-22/rupdated.js) to effectively
"backedup"](https://s.natalian.org/2022/rupdated.js) to effectively
trigger a backup.

NOTE: DynamoDB triggers need to be manually associated / setup with the lambda function.
Expand Down
10 changes: 8 additions & 2 deletions aws-node-env-variables-encrypted-in-a-file/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Storing Encrypted Secrets example in NodeJS
description: This example demonstrates how to store secrets like API keys encrypted in your repository while providing them as environment variables to your AWS Lambda functions.
title: 'AWS Storing Encrypted Secrets example in NodeJS'
description: 'This example demonstrates how to store secrets like API keys encrypted in your repository while providing them as environment variables to your AWS Lambda functions.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/rupakg'
authorName: 'Rupak Ganguly'
authorAvatar: 'https://avatars0.githubusercontent.com/u/8188?v=4&s=140'
-->
# Serverless

Expand Down
30 changes: 18 additions & 12 deletions aws-node-env-variables/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Serverless Environment Variables Usage example in NodeJS
description: This example demonstrates how to use environment variables for AWS Lambdas.
title: 'AWS Serverless Environment Variables Usage example in NodeJS'
description: 'This example demonstrates how to use environment variables for AWS Lambdas.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/rupakg'
authorName: 'Rupak Ganguly'
authorAvatar: 'https://avatars0.githubusercontent.com/u/8188?v=4&s=140'
-->
# Serverless Environment Variables Usage

Expand Down Expand Up @@ -73,12 +79,12 @@ The expected result should be similar to:
"body": "{\"message\":\"User created\"}"
}
--------------------------------------------------------------------
START RequestId: 78b0785d-afd3-11e6-8582-a7abb1cd48ef Version: $LATEST
2016-11-21 11:15:48.575 (+01:00) 78b0785d-afd3-11e6-8582-a7abb1cd48ef PASSWORD_ITERATIONS: 4096
2016-11-21 11:15:48.576 (+01:00) 78b0785d-afd3-11e6-8582-a7abb1cd48ef PASSWORD_DERIVED_KEY_LENGTH: 256
2016-11-21 11:15:48.576 (+01:00) 78b0785d-afd3-11e6-8582-a7abb1cd48ef EMAIL_SERVICE_API_KEY: KEYEXAMPLE1234
END RequestId: 78b0785d-afd3-11e6-8582-a7abb1cd48ef
REPORT RequestId: 78b0785d-afd3-11e6-8582-a7abb1cd48ef Duration: 3.36 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 15 MB
START RequestId: 78b0785d-afd3-11e6-85a7abb1cd48ef Version: $LATEST
2021 11:15:48.575 (+01:00) 78b0785d-afd3-11e6-85a7abb1cd48ef PASSWORD_ITERATIONS: 4096
2021 11:15:48.576 (+01:00) 78b0785d-afd3-11e6-85a7abb1cd48ef PASSWORD_DERIVED_KEY_LENGTH: 256
2021 11:15:48.576 (+01:00) 78b0785d-afd3-11e6-85a7abb1cd48ef EMAIL_SERVICE_API_KEY: KEYEXAMPLE1234
END RequestId: 78b0785d-afd3-11e6-85a7abb1cd48ef
REPORT RequestId: 78b0785d-afd3-11e6-85a7abb1cd48ef Duration: 3.36 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 15 MB
```

```bash
Expand All @@ -93,10 +99,10 @@ The expected result should be similar to:
"body": "{\"message\":\"Password sent.\"}"
}
--------------------------------------------------------------------
START RequestId: 9cc33d72-afd3-11e6-b918-19a4e146bf3d Version: $LATEST
2016-11-21 11:16:48.838 (+01:00) 9cc33d72-afd3-11e6-b918-19a4e146bf3d EMAIL_SERVICE_API_KEY: KEYEXAMPLE1234
END RequestId: 9cc33d72-afd3-11e6-b918-19a4e146bf3d
REPORT RequestId: 9cc33d72-afd3-11e6-b918-19a4e146bf3d Duration: 3.14 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 15 MB
START RequestId: 9cc33dafd3-11e6-b919a4e146bf3d Version: $LATEST
2021 11:16:48.838 (+01:00) 9cc33dafd3-11e6-b919a4e146bf3d EMAIL_SERVICE_API_KEY: KEYEXAMPLE1234
END RequestId: 9cc33dafd3-11e6-b919a4e146bf3d
REPORT RequestId: 9cc33dafd3-11e6-b919a4e146bf3d Duration: 3.14 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 15 MB
```

Especially helpful for local development you can also invoke the Lambda locally and see the resulting log via
Expand Down
16 changes: 11 additions & 5 deletions aws-node-fetch-file-and-store-in-s3/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Fetch image from URL and upload to S3 example in NodeJS
description: This example display how to fetch an image from remote source (URL) and then upload this image to a S3 bucket.
title: 'AWS Fetch image from URL and upload to S3 example in NodeJS'
description: 'This example display how to fetch an image from remote source (URL) and then upload this image to a S3 bucket.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/ScottBrenner'
authorName: 'Scott Brenner'
authorAvatar: 'https://avatars2.githubusercontent.com/u/416477?v=4&s=140'
-->
# Fetch image from URL then upload to s3 Example

Expand Down Expand Up @@ -89,9 +95,9 @@ The expected result should be similar to:
```bash
"Saved"
--------------------------------------------------------------------
START RequestId: c658859d-bd42-11e6-ac1f-c7a7ee5bd7f3 Version: $LATEST
END RequestId: c658859d-bd42-11e6-ac1f-c7a7ee5bd7f3
REPORT RequestId: c658859d-bd42-11e6-ac1f-c7a7ee5bd7f3 Duration: 436.94 ms Billed Duration: 500 ms Memory Size: 1024 MB Max Memory Used: 29 MB
START RequestId: c658859d-bd11e6-ac1f-c7a7ee5bd7f3 Version: $LATEST
END RequestId: c658859d-bd11e6-ac1f-c7a7ee5bd7f3
REPORT RequestId: c658859d-bd11e6-ac1f-c7a7ee5bd7f3 Duration: 436.94 ms Billed Duration: 500 ms Memory Size: 1024 MB Max Memory Used: 29 MB
```

## Scaling
Expand Down
18 changes: 12 additions & 6 deletions aws-node-function-compiled-with-babel/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Function compiled with Babel example in NodeJS
description: This example demonstrates how to compile your JavaScript code with Babel. In order to do so the 'serverless-babel-plugin' is leveraged.
title: 'AWS Function compiled with Babel example in NodeJS'
description: 'This example demonstrates how to compile your JavaScript code with Babel. In order to do so the ''serverless-babel-plugin'' is leveraged.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/rupakg'
authorName: 'Rupak Ganguly'
authorAvatar: 'https://avatars0.githubusercontent.com/u/8188?v=4&s=140'
-->
# Function compiled with Babel

Expand Down Expand Up @@ -68,8 +74,8 @@ The expected result should be similar to:
}
}
--------------------------------------------------------------------
START RequestId: 4388ee49-affe-11e6-9e69-1bde31ed2e43 Version: $LATEST
2016-11-21 16:22:07.748 (+01:00) 4388ee49-affe-11e6-9e69-1bde31ed2e43 { response: { statusCode: 200, body: { message: 'Success!' } } }
END RequestId: 4388ee49-affe-11e6-9e69-1bde31ed2e43
REPORT RequestId: 4388ee49-affe-11e6-9e69-1bde31ed2e43 Duration: 23.13 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 17 MB
START RequestId: 4388eeaffe-11e6-9e1bde31ed2e43 Version: $LATEST
2021 16:22:07.748 (+01:00) 4388eeaffe-11e6-9e1bde31ed2e43 { response: { statusCode: 200, body: { message: 'Success!' } } }
END RequestId: 4388eeaffe-11e6-9e1bde31ed2e43
REPORT RequestId: 4388eeaffe-11e6-9e1bde31ed2e43 Duration: 23.13 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 17 MB
```
12 changes: 9 additions & 3 deletions aws-node-github-webhook-listener/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Serverless Github Webhook Listener example in NodeJS
description: This service will listen to github webhooks fired by a given repository.
title: 'AWS Serverless Github Webhook Listener example in NodeJS'
description: 'This service will listen to github webhooks fired by a given repository.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/adambrgmn'
authorName: 'Adam Bergman'
authorAvatar: 'https://avatars1.githubusercontent.com/u/13746650?v=4&s=140'
-->
# Serverless Github webhook listener

Expand Down Expand Up @@ -93,7 +99,7 @@ This service will listen to github webhooks fired by a given repository.

**(3.)** Choose the types of events you want the github webhook to fire on

![webhook-steps](https://cloud.githubusercontent.com/assets/532272/21461773/db7cecd2-c922-11e6-9362-6bbf4661fe14.jpg)
![webhook-steps](https://cloud.githubusercontent.com/assets/532272/21461773/db7cecd2-c911e6-936bbf4661fe14.jpg)


4. Manually trigger/test the webhook from settings or do something in your github repo to trigger a webhook.
Expand Down
10 changes: 8 additions & 2 deletions aws-node-graphql-api-with-dynamodb/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: GraphQL query endpoint in NodeJS on AWS with DynamoDB
description: A single-module GraphQL endpoint with query and mutation functionality.
title: 'GraphQL query endpoint in NodeJS on AWS with DynamoDB'
description: 'A single-module GraphQL endpoint with query and mutation functionality.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/gismoranas'
authorName: 'Gismo Ranas'
authorAvatar: 'https://avatars0.githubusercontent.com/u/5903107?v=4&s=140'
-->

# GraphQL query endpoint in NodeJS on AWS with DynamoDB
Expand Down
22 changes: 14 additions & 8 deletions aws-node-iot-event/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<!--
title: AWS Serverless IoT Event example in NodeJS
description: This example demonstrates how to setup a AWS IoT Rule to send events to a Lambda function.
title: 'AWS Serverless IoT Event example in NodeJS'
description: 'This example demonstrates how to setup a AWS IoT Rule to send events to a Lambda function.'
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/rupakg'
authorName: 'Rupak Ganguly'
authorAvatar: 'https://avatars0.githubusercontent.com/u/8188?v=4&s=140'
-->
# Serverless IoT Event

Expand Down Expand Up @@ -46,7 +52,7 @@ functions:

In `serverless.yml` the log-function is configured to receive any event from the IoT Topic `mybutton`. We now can go to the IoT Console and visit the Tab `Test`.

![iot-console-test](https://cloud.githubusercontent.com/assets/223045/21593597/352be866-d119-11e6-9639-994b9c495571.png)
![iot-console-test](https://cloud.githubusercontent.com/assets/223045/21593597/352be8d111e6-96994b9c495571.png)

There fill `mybutton` into the topic input field in the publish section. Replace existing example data with the following example and press the publish button.

Expand All @@ -57,7 +63,7 @@ There fill `mybutton` into the topic input field in the publish section. Replace
}
```

![iot-console-form](https://cloud.githubusercontent.com/assets/223045/21593596/352be71c-d119-11e6-979a-7aa70abd2bf2.png)
![iot-console-form](https://cloud.githubusercontent.com/assets/223045/21593596/352be71c-d111e6-979a-7aa70abd2bf2.png)

To verify that our event was forwarded to our log-function run

Expand All @@ -68,10 +74,10 @@ serverless logs --function log
The expected result should be similar to:

```bash
START RequestId: 24192153-d10f-11e6-936c-a98ff4127599 Version: $LATEST
2017-01-02 18:16:04.768 (+01:00) 24192153-d10f-11e6-936c-a98ff4127599 { message: 'My first IoT event', value: 2 }
END RequestId: 24192153-d10f-11e6-936c-a98ff4127599
REPORT RequestId: 24192153-d10f-11e6-936c-a98ff4127599 Duration: 23.53 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 8 MB
START RequestId: 241921d10f-11e6-936c-a98ff4127599 Version: $LATEST
2002 18:16:04.768 (+01:00) 241921d10f-11e6-936c-a98ff4127599 { message: 'My first IoT event', value: 2 }
END RequestId: 241921d10f-11e6-936c-a98ff4127599
REPORT RequestId: 241921d10f-11e6-936c-a98ff4127599 Duration: 23.53 ms Billed Duration: 100 ms Memory Size: 1024 MB Max Memory Used: 8 MB
```
In the output you can see the IoT event that has been triggered from the test console.
10 changes: 10 additions & 0 deletions aws-node-oauth-dropbox-api/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<!--
title: TODO
description: TODO
layout: Doc
framework: v1
platform: AWS
language: nodeJS
authorLink: 'https://github.com/Jay DeshmukhJay Deshmukh'
-->

###

#### For Dev
Expand Down
Loading

0 comments on commit 19024bd

Please sign in to comment.