Showing preview only (1,518K chars total). Download the full file or copy to clipboard to get everything.
Repository: serverless/examples
Branch: v4
Commit: 631c0739a793
Files: 1049
Total size: 1.3 MB
Directory structure:
gitextract_k325cu19/
├── .editorconfig
├── .eslintignore
├── .eslintrc.json
├── .github/
│ ├── pull_request_template.md
│ └── workflows/
│ └── trigger-examples-docs.yml
├── .gitignore
├── .travis.yml
├── LICENSE.txt
├── README.md
├── aws-dotnet-rest-api-with-dynamodb/
│ ├── .gitignore
│ ├── DotNetServerless.sln
│ ├── README.MD
│ ├── src/
│ │ ├── DotNetServerless.Application/
│ │ │ ├── DotNetServerless.Application.csproj
│ │ │ ├── Entities/
│ │ │ │ └── Item.cs
│ │ │ ├── Handlers/
│ │ │ │ ├── CreateItemHandler.cs
│ │ │ │ ├── GetItemHandler.cs
│ │ │ │ └── UpdateItemHandler.cs
│ │ │ ├── Infrastructure/
│ │ │ │ ├── AWSClientFactory.cs
│ │ │ │ ├── Configs/
│ │ │ │ │ ├── AwsBasicConfiguration.cs
│ │ │ │ │ └── DynamoDbConfiguration.cs
│ │ │ │ └── Repositories/
│ │ │ │ ├── IItemRepository.cs
│ │ │ │ └── ItemDynamoRepository.cs
│ │ │ ├── Requests/
│ │ │ │ ├── CreateItemRequest.cs
│ │ │ │ ├── GetItemRequest.cs
│ │ │ │ └── UpdateItemRequest.cs
│ │ │ └── Responses/
│ │ │ └── ItemResponse.cs
│ │ └── DotNetServerless.Lambda/
│ │ ├── DotNetServerless.Lambda.csproj
│ │ ├── Extensions/
│ │ │ └── ServicesExtensions.cs
│ │ ├── Functions/
│ │ │ ├── CreateItemFunction.cs
│ │ │ ├── GetItemFunction.cs
│ │ │ └── UpdateItemFunction.cs
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── package.json
│ │ └── serverless.yml
│ └── tests/
│ └── DotNetServerless.Tests/
│ ├── DotNetServerless.Tests.csproj
│ └── Functions/
│ ├── CreateItemFunctionTests.cs
│ ├── GetItemFunctionTests.cs
│ └── UpdateItemFunctionTests.cs
├── aws-ffmpeg-layer/
│ ├── .gitignore
│ ├── README.md
│ ├── build.sh
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-golang-auth-examples/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── functions/
│ │ ├── auth/
│ │ │ ├── auth_suite_test.go
│ │ │ ├── main.go
│ │ │ └── main_test.go
│ │ ├── auth2/
│ │ │ ├── auth_suite_test.go
│ │ │ ├── main.go
│ │ │ └── main_test.go
│ │ ├── hello-world/
│ │ │ ├── hello_world_suite_test.go
│ │ │ ├── main.go
│ │ │ └── main_test.go
│ │ └── hello-world2/
│ │ ├── hello_world_suite_test.go
│ │ ├── main.go
│ │ └── main_test.go
│ ├── go.mod
│ ├── go.sum
│ ├── package.json
│ └── serverless.yml
├── aws-golang-dynamo-stream-to-elasticsearch/
│ ├── Gopkg.toml
│ ├── Makefile
│ ├── README.md
│ ├── cmd/
│ │ ├── aws-golang-dynamo-stream-to-elasticsearch/
│ │ │ └── main.go
│ │ └── seed-dynamo/
│ │ └── main.go
│ ├── dstream/
│ │ ├── details.go
│ │ └── update.go
│ ├── package.json
│ └── serverless.yml
├── aws-golang-googlemap/
│ ├── Gopkg.toml
│ ├── Makefile
│ ├── README.md
│ ├── geomap/
│ │ └── geomap.go
│ ├── getgeodetail/
│ │ └── main.go
│ ├── getgeolocation/
│ │ └── main.go
│ ├── getnearbylocation/
│ │ └── main.go
│ ├── getsearchlocation/
│ │ └── main.go
│ └── serverless.yml
├── aws-golang-http-get-post/
│ ├── Gopkg.toml
│ ├── Makefile
│ ├── README.md
│ ├── getFolder/
│ │ ├── getExample.go
│ │ ├── getQueryExample.go
│ │ ├── go.mod
│ │ └── go.sum
│ ├── package.json
│ ├── postFolder/
│ │ ├── go.mod
│ │ ├── go.sum
│ │ └── postExample.go
│ └── serverless.yml
├── aws-golang-rest-api-with-dynamodb/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ ├── package.json
│ ├── serverless.yml
│ └── todos/
│ ├── create.go
│ ├── delete.go
│ ├── get.go
│ ├── list.go
│ └── update.go
├── aws-golang-s3-file-replicator/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── go.mod
│ ├── go.sum
│ ├── gomod.sh
│ ├── serverless.yml
│ └── src/
│ └── main.go
├── aws-golang-simple-http-endpoint/
│ ├── Gopkg.toml
│ ├── Makefile
│ ├── README.md
│ ├── hello/
│ │ └── main.go
│ ├── package.json
│ ├── serverless.yml
│ └── world/
│ └── main.go
├── aws-golang-stream-kinesis-to-elasticsearch/
│ ├── Gopkg.toml
│ ├── Makefile
│ ├── README.md
│ ├── elastic/
│ │ └── elastic.go
│ ├── main.go
│ ├── package.json
│ └── serverless.yml
├── aws-java-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── build.gradle
│ ├── gradle/
│ │ └── wrapper/
│ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ ├── pom.xml
│ ├── serverless.yml
│ └── src/
│ └── main/
│ ├── java/
│ │ └── com/
│ │ └── serverless/
│ │ ├── ApiGatewayResponse.java
│ │ ├── Handler.java
│ │ └── Response.java
│ └── resources/
│ └── log4j.properties
├── aws-multiple-runtime/
│ ├── README.md
│ ├── api/
│ │ ├── .gitignore
│ │ └── handler.js
│ ├── serverless.yml
│ └── web/
│ └── handler.py
├── aws-node/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ └── serverless.yml
├── aws-node-alexa-skill/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-auth0-cognito-custom-authorizers-api/
│ ├── .gitignore
│ ├── README.md
│ ├── auth.js
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-auth0-custom-authorizers-api/
│ ├── .gitignore
│ ├── README.md
│ ├── frontend/
│ │ ├── app.css
│ │ ├── app.js
│ │ └── index.html
│ ├── handler.js
│ ├── package.json
│ ├── public_key-example
│ ├── secrets.example.json
│ └── serverless.yml
├── aws-node-cdk-extension/
│ ├── README.md
│ ├── bin/
│ │ └── example.js
│ ├── cdk.json
│ ├── lib/
│ │ └── example-stack.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-dynamic-image-resizer/
│ ├── Dockerfile
│ ├── README.md
│ ├── config/
│ │ ├── pull-secret.sh
│ │ └── push-secret.sh
│ ├── deploy.sh
│ ├── docker-compose.yml
│ ├── package.json
│ ├── secrets/
│ │ ├── secrets.env
│ │ └── secrets.json
│ ├── serverless.yml
│ ├── src/
│ │ ├── handlers/
│ │ │ └── resizer/
│ │ │ ├── index.js
│ │ │ ├── resizeHandler.js
│ │ │ └── s3Handler.js
│ │ └── lib/
│ │ └── BaseHandler.js
│ └── webpack.config.js
├── aws-node-dynamodb-backup/
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-env-variables/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-env-variables-encrypted-in-a-file/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ ├── secrets.dev.yml.encrypted
│ ├── secrets.prod.yml.encrypted
│ └── serverless.yml
├── aws-node-express-api/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-express-dynamodb-api/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-fetch-file-and-store-in-s3/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-fullstack/
│ ├── README.md
│ ├── backend/
│ │ ├── .gitignore
│ │ ├── index.js
│ │ ├── package.json
│ │ └── serverless.yml
│ └── frontend/
│ ├── .gitignore
│ ├── package.json
│ ├── public/
│ │ ├── index.html
│ │ └── manifest.json
│ └── src/
│ ├── DemoApp.css
│ ├── DemoApp.js
│ ├── index.css
│ └── index.js
├── aws-node-function-compiled-with-babel/
│ ├── .gitignore
│ ├── README.md
│ ├── createResponse.js
│ ├── event.json
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-github-check/
│ ├── .babelrc
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── libs/
│ │ ├── github-service.js
│ │ └── response-lib.js
│ ├── package.json
│ ├── serverless.yaml
│ └── webpack.config.js
├── aws-node-github-webhook-listener/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-graphql-and-rds/
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ ├── resolver/
│ │ ├── Common/
│ │ │ ├── aurora.js
│ │ │ ├── mysql.js
│ │ │ └── postgresql.js
│ │ ├── Mutation/
│ │ │ ├── aurora_createUser.js
│ │ │ ├── mysql_createUser.js
│ │ │ └── postgresql_createUser.js
│ │ └── Query/
│ │ ├── aurora_getUser.js
│ │ ├── mysql_getUser.js
│ │ └── postgresql_getUser.js
│ ├── resource/
│ │ ├── AuroraRDSCluster.yml
│ │ ├── AuroraRDSClusterParameter.yml
│ │ ├── AuroraRDSInstance.yml
│ │ ├── AuroraRDSInstanceParameter.yml
│ │ ├── LambdaRole.yml
│ │ ├── MySqlRDSInstance.yml
│ │ ├── PostgreSqlRDSInstance.yml
│ │ ├── RoutePublic.yml
│ │ ├── RouteTableAssociationSubnetA.yml
│ │ ├── RouteTableAssociationSubnetB.yml
│ │ ├── RouteTableAssociationSubnetC.yml
│ │ ├── RouteTablePublic.yml
│ │ ├── ServerlessInternetGateway.yml
│ │ ├── ServerlessSecurityGroup.yml
│ │ ├── ServerlessSubnetA.yml
│ │ ├── ServerlessSubnetB.yml
│ │ ├── ServerlessSubnetC.yml
│ │ ├── ServerlessSubnetGroup.yml
│ │ ├── ServerlessVPC.yml
│ │ └── ServerlessVPCGA.yml
│ ├── schema.gql
│ ├── secrets.json
│ └── serverless.yml
├── aws-node-graphql-api-with-dynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-heroku-postgres/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── index.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-http-api/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ └── serverless.yml
├── aws-node-http-api-dynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── todos/
│ ├── create.js
│ ├── delete.js
│ ├── get.js
│ ├── list.js
│ └── update.js
├── aws-node-http-api-dynamodb-local/
│ ├── .gitignore
│ ├── README.md
│ ├── dynamodb/
│ │ ├── Dockerfile
│ │ └── docker-compose.yml
│ ├── offline/
│ │ └── migrations/
│ │ └── todos.json
│ ├── package.json
│ ├── serverless.yml
│ └── todos/
│ ├── create.js
│ ├── delete.js
│ ├── dynamodb.js
│ ├── get.js
│ ├── list.js
│ └── update.js
├── aws-node-http-api-mongodb/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── model/
│ │ └── User.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-http-api-typescript/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.ts
│ ├── package.json
│ ├── serverless.template.yml
│ └── serverless.yml
├── aws-node-http-api-typescript-dynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ ├── todos/
│ │ ├── create.ts
│ │ ├── get.ts
│ │ ├── list.ts
│ │ └── update.ts
│ ├── tsconfig.json
│ └── tslint.json
├── aws-node-iot-event/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-mongodb-atlas/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── index.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-oauth-dropbox-api/
│ ├── .gitignore
│ ├── README.md
│ ├── config/
│ │ ├── default.yml
│ │ ├── default_test.yml
│ │ ├── stage.yml
│ │ └── stage_test.yml
│ ├── dropbox/
│ │ └── handler.js
│ ├── package.json
│ ├── serverless.yml
│ └── test/
│ └── test.js
├── aws-node-puppeteer/
│ ├── .gitignore
│ ├── README.md
│ ├── chrome-script.js
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-recursive-function/
│ ├── .gitignore
│ ├── README.md
│ ├── event.json
│ ├── handler.js
│ └── serverless.yml
├── aws-node-rekognition-analysis-s3-image/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── lib/
│ │ └── imageAnalyser.js
│ ├── package.json
│ ├── post.json
│ └── serverless.yml
├── aws-node-rest-api/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── serverless.template.yml
│ └── serverless.yml
├── aws-node-rest-api-mongodb/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── model/
│ │ └── User.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-rest-api-typescript/
│ ├── .editorconfig
│ ├── .gitignore
│ ├── .nycrc.json
│ ├── README.md
│ ├── app/
│ │ ├── controller/
│ │ │ └── books.ts
│ │ ├── handler.ts
│ │ ├── model/
│ │ │ ├── books.ts
│ │ │ ├── dto/
│ │ │ │ └── createBookDTO.ts
│ │ │ ├── index.ts
│ │ │ ├── mongoose-db.ts
│ │ │ └── vo/
│ │ │ └── responseVo.ts
│ │ ├── service/
│ │ │ └── books.ts
│ │ └── utils/
│ │ └── message.ts
│ ├── package.json
│ ├── serverless.template.yml
│ ├── serverless.yml
│ ├── tests/
│ │ ├── books.mock.ts
│ │ └── books.test.ts
│ ├── tsconfig.json
│ └── tslint.json
├── aws-node-rest-api-typescript-simple/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.ts
│ ├── package.json
│ └── serverless.yml
├── aws-node-rest-api-with-dynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── todos/
│ ├── create.js
│ ├── delete.js
│ ├── get.js
│ ├── list.js
│ └── update.js
├── aws-node-rest-api-with-dynamodb-and-offline/
│ ├── .gitignore
│ ├── README.md
│ ├── dynamodb/
│ │ ├── Dockerfile
│ │ └── docker-compose.yml
│ ├── offline/
│ │ └── migrations/
│ │ └── todos.json
│ ├── package.json
│ ├── serverless.yml
│ └── todos/
│ ├── create.js
│ ├── delete.js
│ ├── dynamodb.js
│ ├── get.js
│ ├── list.js
│ └── update.js
├── aws-node-s3-file-replicator/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-scheduled-cron/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ └── serverless.yml
├── aws-node-scheduled-weather/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── lib/
│ │ ├── email.js
│ │ └── forecast.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-serve-dynamic-html-via-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-serverless-gong/
│ ├── README.md
│ ├── handler.js
│ ├── node
│ ├── package.json
│ ├── serverless-examples@0.0.0
│ └── serverless.yml
├── aws-node-ses-receive-email-body/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-ses-receive-email-header/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-shared-gateway/
│ ├── README.md
│ ├── ci-decomission.sh
│ ├── ci-deploy.sh
│ ├── gateway/
│ │ ├── .gitignore
│ │ └── serverless.yml
│ ├── package.json
│ ├── products/
│ │ ├── .gitignore
│ │ ├── handler.js
│ │ └── serverless.yml
│ ├── transactions/
│ │ ├── .gitignore
│ │ ├── handler.js
│ │ └── serverless.yml
│ └── users/
│ ├── .gitignore
│ ├── handler.js
│ └── serverless.yml
├── aws-node-signed-uploads/
│ ├── .babelrc
│ ├── .eslintrc
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ ├── src/
│ │ └── upload.js
│ └── webpack.config.js
├── aws-node-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-simple-transcribe-s3/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-single-page-app-via-cloudfront/
│ ├── .gitignore
│ ├── README.md
│ ├── app/
│ │ ├── app.js
│ │ └── index.html
│ ├── package.json
│ ├── serverless-single-page-app-plugin/
│ │ ├── index.js
│ │ └── package.json
│ └── serverless.yml
├── aws-node-sqs-worker/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ ├── serverless.template.yml
│ └── serverless.yml
├── aws-node-stripe-integration/
│ ├── .gitignore
│ ├── README.md
│ ├── config/
│ │ └── default.yaml
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-telegram-echo-bot/
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-text-analysis-via-sns-post-processing/
│ ├── .gitignore
│ ├── README.md
│ ├── addNote.js
│ ├── analyzeNote.js
│ ├── config.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-twilio-send-text-message/
│ ├── .gitignore
│ ├── .npmignore
│ ├── README.md
│ ├── event.json
│ ├── frontend/
│ │ ├── app.css
│ │ └── index.html
│ ├── handler.js
│ ├── messenger.js
│ ├── messenger.test.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-twitter-joke-bot/
│ ├── README.md
│ ├── handler.js
│ ├── helpers/
│ │ ├── jokes.js
│ │ └── twitter.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-typescript-apollo-lambda/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ ├── src/
│ │ ├── graphql/
│ │ │ ├── apolloServer.ts
│ │ │ ├── resolvers/
│ │ │ │ ├── mutations/
│ │ │ │ │ ├── dummyMutation.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── queries/
│ │ │ │ │ ├── dummyQuery.ts
│ │ │ │ │ └── index.ts
│ │ │ │ └── typings.ts
│ │ │ └── type-defs/
│ │ │ ├── index.ts
│ │ │ ├── inputs/
│ │ │ │ └── DummyInput.ts
│ │ │ ├── objects/
│ │ │ │ └── DummyObject.ts
│ │ │ └── root/
│ │ │ ├── Mutation.ts
│ │ │ └── Query.ts
│ │ └── handler.ts
│ ├── tsconfig.json
│ └── tslint.json
├── aws-node-typescript-kinesis/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.ts
│ ├── kinesis/
│ │ ├── consumer.ts
│ │ └── producer.ts
│ ├── package.json
│ ├── serverless.yml
│ ├── tsconfig.json
│ ├── tslint.json
│ └── webpack.config.js
├── aws-node-typescript-nest/
│ ├── .gitignore
│ ├── .prettierrc
│ ├── README.md
│ ├── bench.js
│ ├── nest-cli.json
│ ├── nodemon-debug.json
│ ├── nodemon.json
│ ├── package.json
│ ├── serverless.yml
│ ├── src/
│ │ ├── app.controller.spec.ts
│ │ ├── app.controller.ts
│ │ ├── app.module.ts
│ │ ├── app.service.ts
│ │ └── main.ts
│ ├── test/
│ │ ├── app.e2e-spec.ts
│ │ └── jest-e2e.json
│ ├── tsconfig.build.json
│ ├── tsconfig.json
│ ├── tsconfig.spec.json
│ └── tslint.json
├── aws-node-typescript-rest-api-with-dynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ ├── todos/
│ │ ├── create.ts
│ │ ├── get.ts
│ │ ├── list.ts
│ │ └── update.ts
│ ├── tsconfig.json
│ └── tslint.json
├── aws-node-typescript-sqs-standard/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.ts
│ ├── package.json
│ ├── serverless.yml
│ ├── sqs/
│ │ ├── receiver.ts
│ │ └── sender.ts
│ ├── tsconfig.json
│ ├── tslint.json
│ └── webpack.config.js
├── aws-node-upload-to-s3-and-postprocess/
│ ├── .gitignore
│ ├── README.md
│ ├── frontend/
│ │ └── index.template.html
│ ├── generate-form.js
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-node-vue-nuxt-ssr/
│ ├── .gitignore
│ ├── README.md
│ ├── binaryMimeTypes.js
│ ├── client/
│ │ ├── components/
│ │ │ └── navbar.vue
│ │ ├── layouts/
│ │ │ └── default.vue
│ │ └── pages/
│ │ ├── dogs/
│ │ │ ├── _breed.vue
│ │ │ └── index.vue
│ │ └── index.vue
│ ├── index.js
│ ├── nuxt.config.js
│ ├── nuxt.js
│ ├── package.json
│ ├── secrets.json
│ └── serverless.yml
├── aws-node-websockets-authorizers/
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── aws-python/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ └── serverless.yml
├── aws-python-alexa-skill/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ └── serverless.yml
├── aws-python-auth0-custom-authorizers-api/
│ ├── .gitignore
│ ├── Makefile
│ ├── README.md
│ ├── frontend/
│ │ ├── app.css
│ │ ├── app.js
│ │ └── index.html
│ ├── lambda_handlers.py
│ ├── package.json
│ ├── public_key-example
│ ├── requirements.txt
│ ├── secrets.example.json
│ └── serverless.yml
├── aws-python-flask-api/
│ ├── README.md
│ ├── app.py
│ ├── package.json
│ ├── requirements.txt
│ └── serverless.yml
├── aws-python-flask-dynamodb-api/
│ ├── README.md
│ ├── app.py
│ ├── package.json
│ ├── requirements.txt
│ └── serverless.yml
├── aws-python-http-api/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ └── serverless.yml
├── aws-python-http-api-with-dynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── todos/
│ ├── __init__.py
│ ├── create.py
│ ├── decimalencoder.py
│ ├── delete.py
│ ├── get.py
│ ├── list.py
│ └── update.py
├── aws-python-http-api-with-pynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── requirements.txt
│ ├── serverless.yml
│ └── todos/
│ ├── __init__.py
│ ├── create.py
│ ├── delete.py
│ ├── get.py
│ ├── list.py
│ ├── todo_model.py
│ └── update.py
├── aws-python-line-echo-bot/
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ ├── requirements.txt
│ ├── serverless.yml
│ └── setup.cfg
├── aws-python-pynamodb-s3-sigurl/
│ ├── .gitignore
│ ├── README.md
│ ├── asset/
│ │ ├── __init__.py
│ │ ├── asset_model.py
│ │ ├── bucket.py
│ │ ├── create.py
│ │ ├── delete.py
│ │ ├── get.py
│ │ ├── list.py
│ │ └── update.py
│ ├── log_cfg.py
│ ├── package.json
│ ├── requirements.txt
│ └── serverless.yml
├── aws-python-rest-api/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ ├── serverless.template.yml
│ └── serverless.yml
├── aws-python-rest-api-with-dynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── todos/
│ ├── __init__.py
│ ├── create.py
│ ├── decimalencoder.py
│ ├── delete.py
│ ├── get.py
│ ├── list.py
│ └── update.py
├── aws-python-rest-api-with-faunadb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── requirements.txt
│ ├── serverless.yml
│ └── todos/
│ ├── __init__.py
│ ├── create.py
│ ├── delete.py
│ ├── get.py
│ ├── list.py
│ ├── makeresult.py
│ ├── schema.py
│ └── update.py
├── aws-python-rest-api-with-pymongo/
│ ├── README.md
│ ├── item/
│ │ ├── __init__.py
│ │ ├── create.py
│ │ ├── delete.py
│ │ ├── get.py
│ │ └── list.py
│ ├── package.json
│ ├── requirements.txt
│ └── serverless.yml
├── aws-python-rest-api-with-pynamodb/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── requirements.txt
│ ├── serverless.yml
│ └── todos/
│ ├── __init__.py
│ ├── create.py
│ ├── delete.py
│ ├── get.py
│ ├── list.py
│ ├── todo_model.py
│ └── update.py
├── aws-python-scheduled-cron/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ └── serverless.yml
├── aws-python-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ └── serverless.yml
├── aws-python-sqs-worker/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ ├── serverless.template.yml
│ └── serverless.yml
├── aws-python-telegram-bot/
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ ├── requirements.txt
│ └── serverless.yml
├── aws-ruby-cron-with-dynamodb/
│ ├── Gemfile
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── src/
│ ├── common/
│ │ ├── adapters/
│ │ │ └── dynamo_db_adapter.rb
│ │ └── services/
│ │ └── create_meal_order_service.rb
│ └── handlers/
│ └── create_meal_order/
│ └── handler.rb
├── aws-ruby-line-bot/
│ ├── .gitignore
│ ├── Gemfile
│ ├── README.md
│ ├── handler.rb
│ ├── package.json
│ └── serverless.yml
├── aws-ruby-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.rb
│ ├── package.json
│ └── serverless.yml
├── aws-ruby-sinatra-dynamodb-api/
│ ├── .gitignore
│ ├── .ruby-version
│ ├── Gemfile
│ ├── README.md
│ ├── api.rb
│ ├── config.ru
│ ├── package.json
│ └── serverless.yml
├── aws-ruby-sqs-with-dynamodb/
│ ├── Gemfile
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── src/
│ ├── common/
│ │ ├── adapters/
│ │ │ ├── dynamo_db_adapter.rb
│ │ │ └── sqs_adapter.rb
│ │ ├── helpers/
│ │ │ └── requests_helper.rb
│ │ ├── schemas/
│ │ │ └── lottery_coupon_schema.rb
│ │ ├── serializers/
│ │ │ └── error_serializer.rb
│ │ ├── services/
│ │ │ ├── create_lottery_coupon_service.rb
│ │ │ └── create_sqs_message_service.rb
│ │ └── validators/
│ │ └── lottery_coupon_validator.rb
│ ├── handlers/
│ │ └── lottery/
│ │ ├── handler.rb
│ │ └── worker.rb
│ └── package.json
├── aws-ruby-step-functions/
│ ├── Gemfile
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── src/
│ ├── common/
│ │ ├── adapters/
│ │ │ └── dynamo_db_adapter.rb
│ │ └── services/
│ │ ├── reserve_parking_service.rb
│ │ └── ticket_service.rb
│ └── handlers/
│ ├── buy_ticket/
│ │ └── handler.rb
│ ├── check_weather/
│ │ └── handler.rb
│ ├── release_parking_space/
│ │ └── handler.rb
│ ├── reserve_parking_lot_space/
│ │ └── handler.rb
│ └── return_ticket/
│ └── handler.rb
├── aws-ruby-step-functions-express/
│ ├── Gemfile
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── src/
│ ├── common/
│ │ ├── adapters/
│ │ │ └── ses_adapter.rb
│ │ └── services/
│ │ └── send_email_service.rb
│ └── handlers/
│ └── send_email/
│ └── handler.rb
├── aws-ruby-step-functions-with-callback/
│ ├── Gemfile
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── src/
│ ├── common/
│ │ ├── adapters/
│ │ │ └── step_functions_adapter.rb
│ │ └── services/
│ │ ├── detection_service.rb
│ │ ├── redaction_service.rb
│ │ └── send_task_token_service.rb
│ └── handlers/
│ ├── check_comment/
│ │ └── handler.rb
│ └── redact_comment/
│ └── handler.rb
├── aws-rust-simple-http-endpoint/
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── test/
│ ├── Cargo.toml
│ └── src/
│ └── main.rs
├── azure-node-line-bot/
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── azure-node-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── azure-node-telegram-bot/
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── azure-node-typescript-servicebus-trigger-endpoint/
│ ├── .eslintignore
│ ├── .eslintrc
│ ├── .prettierrc
│ ├── README.md
│ ├── host.json
│ ├── local.settings.json
│ ├── package.json
│ ├── serverless.yml
│ ├── src/
│ │ ├── config/
│ │ │ └── loggerConfig.ts
│ │ ├── controller/
│ │ │ ├── messageSenderController.ts
│ │ │ └── triggerFunctionController.ts
│ │ ├── model/
│ │ │ └── sampleModel.ts
│ │ └── service/
│ │ └── serviceBusMessageSender.ts
│ ├── tsconfig.json
│ └── webpack.config.js
├── check-if-readme-is-up-to-date.sh
├── compose-multiframework/
│ ├── README.md
│ ├── cloudformation/
│ │ └── template.yml
│ ├── sam/
│ │ ├── handler.js
│ │ ├── samconfig.toml
│ │ └── template.yml
│ ├── serverless-compose.yml
│ └── traditional/
│ ├── handler.js
│ └── serverless.yml
├── examples.json
├── generate-readme.js
├── google-golang-simple-http-endpoint/
│ ├── .gcloudignore
│ ├── README.md
│ ├── hello.go
│ ├── package.json
│ └── serverless.yml
├── google-node-simple-http-endpoint/
│ ├── README.md
│ ├── index.js
│ ├── package.json
│ └── serverless.yml
├── google-node-typescript-http-endpoint/
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ ├── src/
│ │ └── App.ts
│ └── tsconfig.json
├── google-python-simple-http-endpoint/
│ ├── README.md
│ ├── main.py
│ ├── package.json
│ ├── requirements.txt
│ └── serverless.yml
├── google-ruby-simple-http-endpoint/
│ ├── Gemfile
│ ├── README.md
│ ├── app.rb
│ ├── package.json
│ └── serverless.yml
├── kubeless-python-simple-function/
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ └── serverless.yml
├── kubeless-python-simple-scheduled-function/
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ └── serverless.yml
├── openwhisk-go-simple/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.go
│ ├── package.json
│ └── serverless.yml
├── openwhisk-node-and-docker-chaining-functions/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── openwhisk-node-chaining-functions/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ ├── serverless.yml
│ └── utils.js
├── openwhisk-node-scheduled-cron/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── openwhisk-node-simple/
│ ├── .gitignore
│ ├── README.md
│ ├── delay.js
│ ├── hello_world.js
│ ├── left_pad.js
│ ├── package.json
│ └── serverless.yml
├── openwhisk-node-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.js
│ ├── package.json
│ └── serverless.yml
├── openwhisk-php-simple/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.php
│ ├── package.json
│ └── serverless.yml
├── openwhisk-python-scheduled-cron/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ └── serverless.yml
├── openwhisk-python-simple/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ └── serverless.yml
├── openwhisk-python-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.py
│ ├── package.json
│ └── serverless.yml
├── openwhisk-ruby-simple/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.rb
│ ├── package.json
│ └── serverless.yml
├── openwhisk-rust-simple-http-endpoint/
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── README.md
│ ├── package.json
│ ├── serverless.yml
│ └── test/
│ ├── Cargo.toml
│ └── src/
│ └── main.rs
├── openwhisk-swift-precompiled-binaries/
│ ├── Package.swift
│ ├── README.md
│ ├── Sources/
│ │ ├── hello/
│ │ │ └── main.swift
│ │ └── welcome/
│ │ └── main.swift
│ ├── package.json
│ └── serverless.yml
├── openwhisk-swift-scheduled-cron/
│ ├── .gitignore
│ ├── README.md
│ ├── handler.swift
│ ├── package.json
│ └── serverless.yml
├── openwhisk-swift-simple/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── ping.swift
│ └── serverless.yml
├── openwhisk-swift-simple-http-endpoint/
│ ├── .gitignore
│ ├── README.md
│ ├── package.json
│ ├── ping.swift
│ └── serverless.yml
├── package.json
├── twilio-node-forward-call/
│ ├── .gitignore
│ ├── README.md
│ ├── forward-call.js
│ ├── package.json
│ └── serverless.yml
└── validate.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
[*.{diff,md}]
trim_trailing_whitespace = false
================================================
FILE: .eslintignore
================================================
node_modules
================================================
FILE: .eslintrc.json
================================================
{
"root": true,
"extends": "airbnb-base",
"env": {
"node": true
},
"rules": {
"strict": "off",
"no-console": "off",
"import/no-unresolved": "off"
}
}
================================================
FILE: .github/pull_request_template.md
================================================
<!-- Hi there ⊂◉‿◉つ
Thanks for submitting a PR! We're excited to see what you've got for us!
Make sure to lint your code to match the rest of the repo.
Run `npm run lint` to lint
-->
================================================
FILE: .github/workflows/trigger-examples-docs.yml
================================================
name: Trigger Sync Examples
on:
push:
branches:
- v4
paths:
- "examples.json"
workflow_dispatch:
inputs:
stage:
description: "Deployment stage"
required: true
default: "dev"
type: choice
options:
- dev
- prod
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Trigger Sync Docs Workflow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.CI_BOT_GITHUB_TOKEN }}
script: |
console.log(`Triggering sync-examples workflow for stage: ${{ github.event.inputs.stage || 'dev' }}`);
await github.rest.actions.createWorkflowDispatch({
owner: 'serverlessinc',
repo: 'growth',
workflow_id: 'sync-examples.yml', // Replace with the actual workflow file name in the target repo
ref: 'main',
inputs: {
stage: '${{ github.event.inputs.stage || 'dev' }}'
}
});
================================================
FILE: .gitignore
================================================
.serverless
*.log
npm-debug.log
pids
*.pid
*.seed
dist
lib-cov
coverage
.grunt
.lock-wscript
node_modules
.idea
.DS_Store
.tmp
.env
env.js
env.yml
env.json
admin.env
tmp
*.pyc
*.swp
*.swo
vendor
./bin/Debug/netcoreapp2.1/
./bin/release/netcoreapp2.1/
================================================
FILE: .travis.yml
================================================
language: node_js
sudo: false
node_js:
- 6
install:
- npm install
script:
- npm run docs
- npm run validate
- ./check-if-readme-is-up-to-date.sh
================================================
FILE: LICENSE.txt
================================================
The MIT License (MIT)
Copyright (c) 2017 Serverless, Inc. http://www.serverless.com
The following license applies to all parts of this software except as
documented below:
====
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
====
All files located in the node_modules and external directories are
externally maintained libraries used by this software which have their
own licenses; we recommend you read them, as their terms may differ from
the terms above.
================================================
FILE: README.md
================================================
<br/>
<div align="center">
<a aria-label="Serverless.com" href="https://serverless.com">Website</a>
•
<a aria-label="Serverless Framework Documentation" href="https://serverless.com/framework/docs/">Documentation</a>
•
<a aria-label="Serverless Inc Twitter" href="https://twitter.com/goserverless">X / Twitter</a>
•
<a aria-label="Serverless Framework Community Slack" href="https://join.slack.com/t/serverless-contrib/shared_invite/zt-2jpqamlep-SRbvbcFGDXmpEXErcL4WWQ">Community Slack</a>
•
<a aria-label="Serverless Framework Community Forum" href="https://forum.serverless.com">Forum</a>
</div>
<br/>
<br/>

# Serverless Examples
A collection of ready-to-deploy [Serverless Framework](https://github.com/serverless/serverless) services.
## Table of Contents
<!-- AUTO-GENERATED-CONTENT:START (TOC:collapse=true&collapseText=Click to expand)
generated w/ `npm run docs`
-->
<details>
<summary>Click to expand</summary>
- [Getting Started](#getting-started)
- [Examples](#examples)
- [Community Examples](#community-examples)
- [Contributing](#contributing)
- [Adding example code](#adding-example-code)
- [Adding a community example](#adding-a-community-example)
</details>
<!-- AUTO-GENERATED-CONTENT:END -->
## Getting Started
If you are new to serverless, we recommend getting started with by creating an HTTP API Endpoint in [NodeJS](https://github.com/serverless/examples/tree/master/aws-node-simple-http-endpoint), [Python](https://github.com/serverless/examples/tree/master/aws-python-simple-http-endpoint), [Java](https://github.com/serverless/examples/tree/master/aws-java-simple-http-endpoint), or [Golang](https://github.com/serverless/examples/tree/master/aws-golang-simple-http-endpoint).
## Examples
Each example contains a `README.md` with an explanation about the service and it's use cases.
**Have an example?** Submit a PR or [open an issue](https://github.com/serverless/examples/issues). ⚡️
To install any of these you can run:
```bash
serverless install -u https://github.com/serverless/examples/tree/master/folder-name -n my-project
```
<!-- AUTO-GENERATED-CONTENT:START (SERVERLESS_EXAMPLE_TABLE) t generated w/ `npm run docs` -->
| Example | Runtime |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------ |
| [Dot Net REST API with DynamoDB](https://github.com/serverless/examples/tree/master/) <br/> Setup a REST API w/ DynamoDB using Dot Net Core 2.1 | unknown |
| [AWS FFmepg Layer](https://github.com/serverless/examples/tree/master/) <br/> AWS FFmepg Layer & a service using it to create GIFs | unknown |
| [AWS Golang Auth](https://github.com/serverless/examples/tree/master/) <br/> This example shows you how to setup auth in front of a AWS Lambda function | unknown |
| [DynamoDB Stream To Elasticsearch](https://github.com/serverless/examples/tree/master/) <br/> Stream data from DynamoDB to Elasticsearch | unknown |
| [Google map api](https://github.com/serverless/examples/tree/master/) <br/> Serverless example using golang to hit google map api | unknown |
| [HTTP GET and POST](https://github.com/serverless/examples/tree/master/) <br/> Boilerplate code for Golang with GET and POST example | unknown |
| [Aws golang rest api with dynamodb](https://github.com/serverless/examples/tree/master/) <br/> Boilerplate code for Golang CRUD Operations | unknown |
| [AWS S3 Bucket Replicator in Golang](https://github.com/serverless/examples/tree/master/) <br/> Boilerplate code for Golang with S3 object create event and replicator example | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP endpoint in Go. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to stream kinesis information into elasticsearch in a golang runtime | unknown |
| [AWS Simple HTTP Endpoint example in Java](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint using Java. Once you ping it, it will reply with the current time. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how you can run multiple runtimes in AWS Lambda. | unknown |
| [AWS Serverless Alexa Skill example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup your own Alexa skill using AWS Lambdas. | unknown |
| [API Gateway Authorizer Function for Auth0 or AWS Cognito using RS256 JSON Web Key Sets tokens.](https://github.com/serverless/examples/tree/master/) <br/> Authorize your API Gateway with either Auth0 or Cognito JWKS RS256 tokens. | unknown |
| [AWS API Gateway Custom Authorizer Function with Auth0 example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This is an example of how to protect API endpoints with Auth0, JSON Web Tokens (jwt) and a custom authorizer lambda function. | unknown |
| [Dynamic Image Resizing API](https://github.com/serverless/examples/tree/master/) <br/> This example shows you how to setup a dynamic image resizer API | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This examples shows your how to create a backup of your DynamoDB table to S3. | unknown |
| [AWS Storing Encrypted Secrets example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> 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. | unknown |
| [AWS Serverless Environment Variables Usage example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to use environment variables for AWS Lambdas. | unknown |
| [Node Express API on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to develop and deploy a simple Node Express API running on AWS Lambda using the Serverless Framework. | unknown |
| [Node Express API service backed by DynamoDB on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to develop and deploy a simple Node Express API service backed by DynamoDB running on AWS Lambda using the Serverless Framework. | unknown |
| [AWS Fetch image from URL and upload to S3 example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example display how to fetch an image from remote source (URL) and then upload this image to a S3 bucket. | unknown |
| [Serverless Email Sign Up Form](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to deploy a Fullstack serverless application | unknown |
| [AWS Function compiled with Babel example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to compile your JavaScript code with Babel. In order to do so the 'serverless-babel-plugin' is leveraged. | unknown |
| [Serverless Github Check](https://github.com/serverless/examples/tree/master/) <br/> The idea is to validate that all Pull Requests are related to a specific trello card. | unknown |
| [AWS Serverless Github Webhook Listener example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This service will listen to github webhooks fired by a given repository. | unknown |
| [A Simple Serverless GraphQL API for MySQL, Postgres and Aurora](https://github.com/serverless/examples/tree/master/) <br/> This is an example project that uses 3 RDS databases to illustrate the differences between using each of them | unknown |
| [GraphQL query endpoint in NodeJS on AWS with DynamoDB](https://github.com/serverless/examples/tree/master/) <br/> A single-module GraphQL endpoint with query and mutation functionality. | unknown |
| [Node.js AWS Lambda connecting to Heroku Postgres](https://github.com/serverless/examples/tree/master/) <br/> Shows how to connect AWS Lambda to Heroku Postgres. Uses an api:release Heroku webhook and the Heroku API to handle automatic Heroku Postgres credential rotation. | unknown |
| [AWS Serverless IoT Event example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a AWS IoT Rule to send events to a Lambda function. | unknown |
| [Node.js AWS Lambda connecting to MongoDB Atlas](https://github.com/serverless/examples/tree/master/) <br/> Shows how to connect AWS Lambda to MongoDB Atlas. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> Connect to Dropbox's API using AWS Lambda. | unknown |
| [Running Puppeteer on AWS Lambda](https://github.com/serverless/examples/tree/master/) <br/> This example shows you how to run Puppeteer on AWS Lambda | unknown |
| [AWS Recursive Lambda function Invocation example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This is an example of a function that will recursively call itself. | unknown |
| [AWS Analyse Image from S3 with Amazon Rekognition example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example shows how to analyze an image in an S3 bucket with Amazon Rekognition and return a list of labels. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrate how to use MongoDB with AWS and Serverless. | unknown |
| [AWS Simple HTTP Endpoint example in NodeJS with Typescript](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to make a simple REST API with Node.js and Typescript running on AWS Lambda and API Gateway using the Serverless Framework v1. | unknown |
| [Serverless Nodejs Rest API with TypeScript And MongoDB Atlas](https://github.com/serverless/examples/tree/master/) <br/> This is simple REST API example for AWS Lambda By Serverless framwork with TypeScript and MongoDB Atlas. | unknown |
| [AWS Serverless REST API with DynamoDB and offline support example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to run a service locally, using the 'serverless-offline' plugin. It provides a REST API to manage Todos stored in DynamoDB. | unknown |
| [AWS Serverless REST API example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a RESTful Web Service allowing you to create, list, get, update and delete Todos. DynamoDB is used to store the data. | unknown |
| [AWS Simple HTTP Endpoint example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to make a simple REST API with Node.js running on AWS Lambda and API Gateway using the traditional Serverless Framework. | unknown |
| [AWS Simple HTTP Endpoint example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to make a simple HTTP API with Node.js running on AWS Lambda and API Gateway using the Serverless Framework. | unknown |
| [AWS S3 File Replicator](https://github.com/serverless/examples/tree/master/) <br/> This example creates 2 AWS S3 buckets and copies files in one bucket to the other | unknown |
| [AWS Node Scheduled Cron example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This is an example of creating a function that runs as a cron job using the serverless ''schedule'' event. | unknown |
| [AWS Node Scheduled Weather example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This is an example of creating a function that runs as a cron job using the serverless 'schedule' event. It retrieves weather information at 10am (UTC) and emails it to a predefined recipient. | unknown |
| [AWS Serving Dynamic HTML via API Gateway example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example illustrates how to hookup an API Gateway endpoint to a Lambda function to render HTML on a GET request. | unknown |
| [The Serverless Gong](https://github.com/serverless/examples/tree/master/) <br/> A serverless gong with GitHub and Slack webhooks | unknown |
| [AWS SES receive emails and process body](https://github.com/serverless/examples/tree/master/) <br/> This example shows how to process receiving emails, and have S3 trigger a lambda function. | unknown |
| [AWS SES receive an email, trigger a lambda function to process header.](https://github.com/serverless/examples/tree/master/) <br/> This example shows how to process receiving email header, and trigger a lambda function. | unknown |
| [Shared AWS API Gateway with multiple Node Lambdas](https://github.com/serverless/examples/tree/master/) <br/> A sample of implementing shared API gateway with multiple Node Lambdas | unknown |
| [AWS Node Signed Uploads](https://github.com/serverless/examples/tree/master/) <br/> The approach implemented in this service is useful when you want to use Amazon API Gateway and you want to solve the 10MB payload limit | unknown |
| [AWS Simple HTTP Endpoint example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time. | unknown |
| [Simple AWS Transcribe example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a lambda function to transcribe your audio file (.wav format) into a text transcription. The lambda will be triggered whenever a new audio file is uploaded to S3 and the transcription (JSON format) will be saved to a S3 bucket. | unknown |
| [AWS Single Page Application example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a Single Page Application. | unknown |
| [Node SQS Producer Consumer on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to develop and deploy a simple SQS-based producer-consumer service running on AWS Lambda using the traditional Serverless Framework. | unknown |
| [AWS Stripe Integration example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example for Stripe integration using AWS Lambda and API Gateway. | unknown |
| [Simple Telegram bot](https://github.com/serverless/examples/tree/master/) <br/> This is a simple echo bot on Telegram. | unknown |
| [AWS Data Processing example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple data processing pipeline. | unknown |
| [AWS Send SMS Message with Twilio example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to send SMS messages with the Twilio SDK and AWS lambda. | unknown |
| [Joke Twitter Bot](https://github.com/serverless/examples/tree/master/) <br/> Twitter bot that will periodically tweet out a joke obtained from a joke API. | unknown |
| [AWS Apollo Lambda (NodeJS & Typescript)](https://github.com/serverless/examples/tree/master/) <br/> This example provides a setup for a Lambda Graphql API with apollo | unknown |
| [AWS Kinesis Data Streams Example (NodeJS & Typescript)](https://github.com/serverless/examples/tree/master/) <br/> Produce and Consume data on a Kinesis Data Stream with Typescript. | unknown |
| [AWS Nest application example (NodeJS & Typescript)](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple [Nest](https://github.com/nestjs/nest) application. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example shows your how to create a TypeScript powered REST API with DynamoDB. | unknown |
| [AWS SQS Standard Example (NodeJS & Typescript)](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a SQS with Typescript. | unknown |
| [AWS Upload a file to S3 to trigger a Lambda function example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example shows how to upload a file to S3 using a HTML form, and have S3 trigger a lambda function. | unknown |
| [Serverless side rendering with Vue.js and Nuxt.js](https://github.com/serverless/examples/tree/master/) <br/> This project demonstrates how to use Nuxt.js to create a server-side rendered Vue.js app on AWS Lambda and AWS API Gateway. | unknown |
| [Simple Websocket Authorizers](https://github.com/serverless/examples/tree/master/) <br/> The example shows you how to deploy simple websocket authorizers | unknown |
| [AWS NodeJS Example](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to deploy a simple NodeJS function running on AWS Lambda using the Serverless Framework. | unknown |
| [AWS Serverless Alexa Skill example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup your own Alexa skill using AWS Lambdas. | unknown |
| [AWS API Gateway Custom Authorizer Function with Auth0 example in Python](https://github.com/serverless/examples/tree/master/) <br/> This is an example of how to protect API endpoints with Auth0, JSON Web Tokens (jwt) and a custom authorizer lambda function in Python 3. | unknown |
| [Python Flask API on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to develop and deploy a simple Python Flask API running on AWS Lambda using the Serverless Framework. | unknown |
| [Python Flask API backed by DynamoDB on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to develop and deploy a simple Python Flask API service backed by DynamoDB running on AWS Lambda using the Serverless Framework. | unknown |
| [Simple LINE bot](https://github.com/serverless/examples/tree/master/) <br/> This is a simple echo bot on LINE bot. | unknown |
| [AWS Serverless REST API with DynamoDB store and presigned URLs example in Python 3.6.](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a RESTful Web Service allowing you to create, list, get, update and delete Assets. DynamoDB is used to store the data. | unknown |
| [AWS Serverless REST API with DynamoDB store example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a RESTful Web Service allowing you to create, list, get, update and delete Todos. DynamoDB is used to store the data. | unknown |
| [AWS Serverless REST API with FaunaDB store example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a RESTful Web Service allowing you to create, list, get, update and delete Todos. FaunaDB is used to store the data. | unknown |
| [AWS Python Rest API with Pymongo](https://github.com/serverless/examples/tree/master/) <br/> AWS Python Rest API with Pymongo Example | unknown |
| [AWS Serverless REST API with DynamoDB store example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a RESTful Web Service allowing you to create, list, get, update and delete Todos. DynamoDB is used to store the data. | unknown |
| [AWS Simple HTTP Endpoint example in Python](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to make a simple REST API with Python running on AWS Lambda and API Gateway using the traditional Serverless Framework. | unknown |
| [AWS Simple HTTP Endpoint example in Python](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to make a simple HTTP API with Python running on AWS Lambda and API Gateway using the Serverless Framework. | unknown |
| [AWS Python Scheduled Cron example in Python](https://github.com/serverless/examples/tree/master/) <br/> This is an example of creating a function that runs as a cron job using the serverless ''schedule'' event. | unknown |
| [AWS Simple HTTP Endpoint example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time. | unknown |
| [Python SQS Producer Consumer on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to develop and deploy a simple SQS-based producer-consumer service running on AWS Lambda using the traditional Serverless Framework. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup an echo Telegram Bot using the Serverless Framework. | unknown |
| [AWS Python Example](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to deploy a Python function running on AWS Lambda using the Serverless Framework. | unknown |
| [Ruby LINE bot](https://github.com/serverless/examples/tree/master/) <br/> This example shows you how to create a LINE bot using Ruby. | unknown |
| [AWS Simple HTTP Endpoint example in Ruby](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint. Once you ping it, it will reply with the current time. | unknown |
| [Ruby Sinatra API backed by DynamoDB on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template demonstrates how to develop and deploy a simple Ruby Sinatra API service backed by DynamoDB running on AWS Lambda using the traditional Serverless Framework. | unknown |
| [AWS Ruby scheduled cron example backed by DynamoDB](https://github.com/serverless/examples/tree/master/) <br/> This is an example of creating a function that runs as a cron job using the serverless 'schedule' event. With the usage of the AWS Lambda function, it creates a record to the DynamoDB each and every 30 minutes. | unknown |
| [AWS Ruby Step Functions](https://github.com/serverless/examples/tree/master/) <br/> AWS Ruby example that make usage of AWS Step Functions with AWS Lambda, DynamoDB and Step Functions flows. | unknown |
| [Serverless AWS Ruby SQS with DynamoDB example](https://github.com/serverless/examples/tree/master/) <br/> A serverless ruby example that creates DynamoDB records with the usage of SQS, API Gateway, and AWS Lambda functions. | unknown |
| [AWS Serverless Boilerplate example in Rust](https://github.com/serverless/examples/tree/master/) <br/> This example shows a Serverless boilerplate in Rust. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a serverless Line Bot using Node.js. | unknown |
| [Azure Simple HTTP Endpoint example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> In this example, we deploy an HTTP Node.js Azure Function. This example shows you how to read properties off of a query string or the request body, then set a result back to Azure. | unknown |
| [TODO](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a serverless Telegram Bot on Azure. | unknown |
| [Using Azure Service Queue to trigger Azure Function](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to trigger an Azure function when a message arrives in Service Bus Queue | unknown |
| [GCF Simple HTTP Endpoint example in golang](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple golang HTTP GET endpoint on GCP Cloud Functions. When you ping the endpoint we've set up you'll see the time returned for the given request type. | unknown |
| [GCF Simple HTTP Endpoint example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint. | unknown |
| [Typescript HTTP Endpoint](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple Typescript HTTP endpoint on GCP. | unknown |
| [GCF Simple HTTP Endpoint example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple python HTTP GET endpoint on GCP Cloud Functions. When you ping the endpoint we've set up you'll see the time returned for the given request type. | unknown |
| [Kubeless Serverless Simple function example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates a simple function example in Python. | unknown |
| [Kubeless Serverless Simple scheduled function example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates a simple sexample in Python for a scheduled function. | unknown |
| [OpenWhisk Serverless Boilerplate example in Go](https://github.com/serverless/examples/tree/master/) <br/> This example shows a Serverless boilerplate in Go. | unknown |
| [OpenWhisk Serverless Boilerplate using Docker example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example shows a Serverless boilerplate using Docker in NodeJS. | unknown |
| [OpenWhisk Serverless Chaining Functions example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates chaining functions in NodeJS. | unknown |
| [OpenWhisk Serverless Scheduled Cron job example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates scheduleding a cron job in NodeJS. | unknown |
| [OpenWhisk Simple HTTP Endpoint example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint. | unknown |
| [OpenWhisk Serverless Simple example in NodeJS](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates a simple example in NodeJS. | unknown |
| [OpenWhisk Serverless Simple example in PHP](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates a simple example in PHP. | unknown |
| [OpenWhisk Serverless Scheduled Cron job example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates scheduleding a cron job. | unknown |
| [OpenWhisk Simple HTTP Endpoint example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint. | unknown |
| [OpenWhisk Serverless Simple example in Python](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates a simple example in Python. | unknown |
| [OpenWhisk Serverless Simple example in Ruby](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates a simple example in Ruby. | unknown |
| [OpenWhisk Serverless Boilerplate example in Rust](https://github.com/serverless/examples/tree/master/) <br/> This example shows a Serverless boilerplate in Rust. | unknown |
| [OpenWhisk Swift example with external libraries and pre compiled binaries](https://github.com/serverless/examples/tree/master/) <br/> This example shows you how to use external packages and deploy binaries | unknown |
| [OpenWhisk Serverless Scheduled Cron job example in Swift](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates scheduling a cron job. | unknown |
| [OpenWhisk Simple HTTP Endpoint example in Swift](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup a simple HTTP GET endpoint. | unknown |
| [OpenWhisk Serverless Simple example in Swift](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates a simple example in Swift. | unknown |
| [Twilio Forward a Call](https://github.com/serverless/examples/tree/master/) <br/> This example projects helps you deploy a serverless function to the Twilio runtime. The function responds the TwiML configuration to forward phone call. | unknown |
| [Serverless Lambda S3 Demonstration](https://github.com/serverless/examples/tree/master/) <br/> This project demonstrates how the Serverless Framework can be used to deploy a NodeJS Lambda function that responds to events in an S3 bucket. | unknown |
| [Spiderless, Web Spider on Serverless](https://github.com/serverless/examples/tree/master/) <br/> A web spider / scraper / website change detector built with Lambda, API Gateway, DynamoDB and SNS | unknown |
| [AWS Demo Java Spring Cloud Function Serverless](https://github.com/serverless/examples/tree/master/) <br/> If Java is your choice of programming language-Spring Cloud Function,Serverless Framework makes a great technology stack. It boosts developer productivity by decoupling from Vendor specific FaaS API, and deployment activities. | unknown |
| [Serverless Architecture Boilerplate](https://github.com/serverless/examples/tree/master/) <br/> Boilerplate to organize and deploy big projects using Serverless and CloudFormation on AWS | unknown |
| [JwtAuthorizr](https://github.com/serverless/examples/tree/master/) <br/> Custom JWT Authorizer Lambda function for Amazon API Gateway with Bearer JWT | unknown |
| [Slack signup serverless](https://github.com/serverless/examples/tree/master/) <br/> Serverless signup to Slack and more. Lambda with Python, StepFunctions, and Web front end. Python boilerplate included. | unknown |
| [Serverless graphql api](https://github.com/serverless/examples/tree/master/) <br/> Serverless GraphQL API using Lambda and DynamoDB | unknown |
| [Serverless screenshot](https://github.com/serverless/examples/tree/master/) <br/> Serverless Screenshot Service using PhantomJS | unknown |
| [Serverless postgraphql](https://github.com/serverless/examples/tree/master/) <br/> GraphQL endpoint for PostgreSQL using postgraphql | unknown |
| [Serverless messenger boilerplate](https://github.com/serverless/examples/tree/master/) <br/> Serverless messenger bot boilerplate | unknown |
| [Serverless npm registry](https://github.com/serverless/examples/tree/master/) <br/> Serverless private npm registry, proxy and cache. | unknown |
| [Serverless facebook quotebot](https://github.com/serverless/examples/tree/master/) <br/> 100% Serverless Facebook messenger chatbot which will respond with inspiring quotes | unknown |
| [Serverless slack trevorbot](https://github.com/serverless/examples/tree/master/) <br/> Slack bot for info on where in the world is Trevor Gerhardt? | unknown |
| [Pfs email serverless](https://github.com/serverless/examples/tree/master/) <br/> This is a lambda function created by the serverless framework. It searches through members in our mongodb who have not been sent emails and sends them an email with their custom token to unlock the pledge free stream. It then marks those members off as already receiving the email. | unknown |
| [Plaid cashburndown service](https://github.com/serverless/examples/tree/master/) <br/> Service for calculating cash burndown with plaid. Frontend code can be found here: https://github.com/cplee/cashburndown-site | unknown |
| [Cordis serverless](https://github.com/serverless/examples/tree/master/) <br/> A serverless API for EU Cordis data | unknown |
| [Serverless newsletter signup](https://github.com/serverless/examples/tree/master/) <br/> Saves user details into DynamoDB table. Required values are email, first_name and last_name. | unknown |
| [Serverless slack cron](https://github.com/serverless/examples/tree/master/) <br/> Lambda function which sends messages to Slack channel in regular intervals via cron trigger. | unknown |
| [Sls access counter](https://github.com/serverless/examples/tree/master/) <br/> Site visitor counter | unknown |
| [Sls form mail](https://github.com/serverless/examples/tree/master/) <br/> Send SNS email from form data | unknown |
| [Serverless python sample](https://github.com/serverless/examples/tree/master/) <br/> A simple serverless python sample with REST API endpoints and dependencies | unknown |
| [Serverless slack emojibot](https://github.com/serverless/examples/tree/master/) <br/> Serverless slack bot for emoji | unknown |
| [Serverless cloudwatch rds custom metrics](https://github.com/serverless/examples/tree/master/) <br/> A NodeJS-based MySQL RDS Data Collection script to push Custom Metrics to Cloudwatch with Serverless | unknown |
| [Sc5 serverless boilerplate](https://github.com/serverless/examples/tree/master/) <br/> A boilerplate that contains setup for test-driven development | unknown |
| [Serverless blog to podcast](https://github.com/serverless/examples/tree/master/) <br/> Service that reads RSS feed and converts the entries to a podcast feed and audio files using Amazon Polly | unknown |
| [Offset trump](https://github.com/serverless/examples/tree/master/) <br/> Single page app using Serverless (C# runtime) and S3 site hosting. Pledge to do a good thing for the next four years to offset the potential negative effects of the US Presidency | unknown |
| [Serverless url shortener](https://github.com/serverless/examples/tree/master/) <br/> A simple url-shortener, using Serverless framework | unknown |
| [Serverless html pdf](https://github.com/serverless/examples/tree/master/) <br/> Service that convert HTML to PDF using PhantomJS's rasterize example. | unknown |
| [Serverless examples cached rds ws](https://github.com/serverless/examples/tree/master/) <br/> A serverless framework example project that uses API Gateway, ElastiCache, and RDS PostgreSQL. | unknown |
| [Bittman](https://github.com/serverless/examples/tree/master/) <br/> A serverless project that follows a stock trading algorithm and uses scheduled functions to save data to DynamoDB and send emails through Mailgun. | unknown |
| [Adoptable pet bot](https://github.com/serverless/examples/tree/master/) <br/> Tweets adoptable pets using Serverless (Node.js) and AWS Lambda | unknown |
| [Owntracks serverless](https://github.com/serverless/examples/tree/master/) <br/> A serverless implementation of the OwnTracks HTTP backend | unknown |
| [Serverless modern koa](https://github.com/serverless/examples/tree/master/) <br/> Serverless modern koa starter kit | unknown |
| [Serverless ReactJS Universal Rendering Boilerplate](https://github.com/serverless/examples/tree/master/) <br/> ReactJS web app Starter kit does universal (isomorphic) rendering with Serverless | unknown |
| [Open Bot](https://github.com/serverless/examples/tree/master/) <br/> An unoptionated Github bot driven by a configuration file in the repository | unknown |
| [Aws ses serverless example](https://github.com/serverless/examples/tree/master/) <br/> AWS SES example in NodeJS using lambda | unknown |
| [Aws node signed uploads](https://github.com/serverless/examples/tree/master/) <br/> Upload files larger than 10MB with AWS Lambda and API Gateway. Can be developed and tested locally. | unknown |
| [SQS Worker with AWS Lambda and CloudWatch Alarms](https://github.com/serverless/examples/tree/master/) <br/> Process messages stored in SQS with an [auto-scaled AWS Lambda worker](https://sbstjn.com/serverless-sqs-worker-with-aws-lambda.html) function. | unknown |
| [Serverless image manager](https://github.com/serverless/examples/tree/master/) <br/> image upload / download with resizing. Used API gateway's binary support & serverless | unknown |
| [Amazon Kinesis Streams fan out via Kinesis Analytics](https://github.com/serverless/examples/tree/master/) <br/> Use Amazon Kinesis Analytics to fan-out your Kinesis Streams and avoid read throttling. | unknown |
| [HoneyLambda](https://github.com/serverless/examples/tree/master/) <br/> a simple, serverless application designed to create and monitor URL {honey}tokens, on top of AWS Lambda and Amazon API Gateway | unknown |
| [Faultline](https://github.com/serverless/examples/tree/master/) <br/> Error tracking tool on AWS managed services. | unknown |
| [Stack Overflow Monitor](https://github.com/serverless/examples/tree/master/) <br/> Monitor Stack Overflow questions and post them in a Slack channel | unknown |
| [Serverless Analytics](https://github.com/serverless/examples/tree/master/) <br/> Write your own Google Analytics clone and track website visitors serverless with API Gateway, Kinesis, Lambda, and DynamoDB. | unknown |
| [Serverless + medium text to speech](https://github.com/serverless/examples/tree/master/) <br/> Serverless-based, text-to-speech service for Medium articles | unknown |
| [Serverless + java DynamoDB imlementation example](https://github.com/serverless/examples/tree/master/) <br/> example for java programmers that want to work with AWS-Lambda and DynamoDB | unknown |
| [AWS Cognito Custom User Pool Example](https://github.com/serverless/examples/tree/master/) <br/> Example CloudFormation custom resource backed by a lambda using Cognito User Pools | unknown |
| [AWS Lambda, Amazon API Gateway, S3, DynamoDB and Cognito Example](https://github.com/serverless/examples/tree/master/) <br/> Step by step guide how to deploy simple web application on top of AWS Lambda, Amazon API Gateway, S3, DynamoDB and Cognito. | unknown |
| [Run your Kubernetes Workloads on Amazon EC2 Spot Instances with Amazon EKS and Lambda Part 1](https://github.com/serverless/examples/tree/master/) <br/> From this tutorial you'll learn how to add AWS EKS Cluster with Spot Instances to your cloud environment managed by Serverless framework | unknown |
| [Serverless + lambda protobuf responses](https://github.com/serverless/examples/tree/master/) <br/> Demo using API Gateway and Lambda with Protocol Buffer | unknown |
| [Serverless Telegram Bot](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to setup an echo Telegram Bot using the Serverless Framework ⚡🤖 | unknown |
| [Serverless + lambda + vpc + nat + redis](https://github.com/serverless/examples/tree/master/) <br/> Demo using API Gateway and Lambda with VPC and NAT to access Internet and AWS Resource | unknown |
| [Serverless Gitlab CI](https://github.com/serverless/examples/tree/master/) <br/> Simple Gitlab CI template for automatic testing and deployments | unknown |
| [Serverless ffmpeg](https://github.com/serverless/examples/tree/master/) <br/> Bucket event driven FFMPEG using serverless. Input bucket => Serverless ffmpeg => Output bucket. | unknown |
| [Realtime WW2 Alexa Skill](https://github.com/serverless/examples/tree/master/) <br/> An alexa skill project that's using Alexa SDK. Can also be used for a working example of serverless-webpack (with use of async/await via babel). | unknown |
| [Serverless Kakao Bot](https://github.com/serverless/examples/tree/master/) <br/> Easy development for Kakaotalk Bot with Serverless | unknown |
| [Personal Access Tokens Cron Check](https://github.com/serverless/examples/tree/master/) <br/> Audit for leaked PAT in your Contentful organization. How to use serverless as cronjobs to keep your Personal Access Tokens secure | unknown |
| [Daily Instance Backups with AMI Rotation](https://github.com/serverless/examples/tree/master/) <br/> A simple Python application which scans through your entire AWS account for tagged instances, makes daily AMIs of them, and rotates their backups automatically | unknown |
| [Serverless Instagram Crawler](https://github.com/serverless/examples/tree/master/) <br/> Instagram hashtag Crawler with Lambda & DynamoDB. | unknown |
| [Serverless Next.js Example](https://github.com/serverless/examples/tree/master/) <br/> Next.js example project for development & deploy. | unknown |
| [Serving binary files](https://github.com/serverless/examples/tree/master/) <br/> Small example showing how to serve binary files using Serverless on AWS with the serverless-apigw-binary plugin, using generated Excel files as an example | unknown |
| [Lambda PubSub via SNS Example](https://github.com/serverless/examples/tree/master/) <br/> Example illustrating the flow: Lambda (publisher) => SNS => Lambda (consumer) | unknown |
| [Serverless CloudWatch Proxy](https://github.com/serverless/examples/tree/master/) <br/> Logging adapter that consumes log streams from AWS CloudWatch, streams them to other log destinations. Also capable of identying alerts and sending notifications via Slack/Email | unknown |
| [Serverless side rendering with Vue.js and Nuxt.js](https://github.com/serverless/examples/tree/master/) <br/> Sample project for using Nuxt.js to create a server-side rendered Vue.js app on AWS Lambda and AWS API Gateway. Can easily integrate with your own API or 3rd party APIs such as headless CMS, e-commerce or serverless architecture. | unknown |
| [Aws mfa enforce](https://github.com/serverless/examples/tree/master/) <br/> Serverless function to automate enforcement of Multi-Factor Authentication (MFA) to all AWS IAM users with access to AWS Management Console. | unknown |
| [Vanity stargazer](https://github.com/serverless/examples/tree/master/) <br/> Github vanity-stargazer is a serverless application to handle posting Github new star gazers to Slack | unknown |
| [Fotopia Serverless](https://github.com/serverless/examples/tree/master/) <br/> A photo archive web app including API, storage and face detection using serverless framework | unknown |
| [Commenting API](https://github.com/serverless/examples/tree/master/) <br/> A commenting api using Serverless Typescript GraphQl and Redis | unknown |
| [Serverless node api dynamodb neo4j](https://github.com/serverless/examples/tree/master/) <br/> Architecture example to stream DynamoDB data to a read-model using Neo4j | unknown |
| [Serverless python rds cron](https://github.com/serverless/examples/tree/master/) <br/> A serverless python example that periodically removes entries from AWS RDS | unknown |
| [Nietzsche](https://github.com/serverless/examples/tree/master/) <br/> A serverless application that fetches quotes from Goodreads and saves it to DynamoDB with example use cases using `Lambda`, `SNS`, `SQS`, `Step Functions`, `DynamoDB`, `API Gateway`, `CloudWatch` | unknown |
| [Serverless DotNet BoilerPlate](https://github.com/serverless/examples/tree/master/) <br/> A serverless starter solution for .NET Core, ready for local debugging in VS Code, HTTP Endpoint, etc. | unknown |
| [Serverless Load Balancer](https://github.com/serverless/examples/tree/master/) <br/> A sample that shows how to combine a load balancer with (vpc/subnet configuration) with a lambda. | unknown |
| [Serverless api typescript template](https://github.com/serverless/examples/tree/master/) <br/> A starter template for a Serverless API using Typescript and Jest | unknown |
| [Serverless SNS SQS offline Example ](https://github.com/serverless/examples/tree/master/) <br/> Minimal example of running serverless-offline with SQS and SNS in local environment. | unknown |
| [Serverless RDS Log Sync S3](https://github.com/serverless/examples/tree/master/) <br/> Annotated exmaple of a periodic scheduled task to sync changed RDS log files to an S3 bucket. | unknown |
| [HTTP Headers Checks](https://github.com/serverless/examples/tree/master/) <br/> Serverless Application to check integrity of the headers of a given HTTP server | unknown |
| [Serverless Image Labeller](https://github.com/serverless/examples/tree/master/) <br/> Serverless image labelling using Rekognition, s3, DynamoDB. | unknown |
| [Serverless AppSync offline TypeScript with CircleCI](https://github.com/serverless/examples/tree/master/) <br/> A Serverless Framework template that allows you to launch an AppSync emulator locally and proceed with development. Lambda Function build by TypeScript/Webpack. | unknown |
| [Serverless Screenshot to S3](https://github.com/serverless/examples/tree/master/) <br/> An example serverless stack which takes a screenshot using aws-chrome-lambda and puts it in s3. NodeJS. | unknown |
| [Express Application With Lambda](https://github.com/serverless/examples/tree/master/) <br/> This example demonstrates how to build an express application for AWS Lambda based on serverless framework. | unknown |
| [DropBucket - Serverless file sharing](https://github.com/serverless/examples/tree/master/) <br/> A serverless file sharing app powered by Cognito/S3/Lambda/API Gateway. Includes a React single-page app UI and virus scanning. | unknown |
| [serverless-pokego](https://github.com/serverless/examples/tree/master/) <br/> Serverless-powered API to fetch nearby Pokemon Go data | unknown |
| [serverless-garden-aid](https://github.com/serverless/examples/tree/master/) <br/> IoT Garden Aid Backend | unknown |
| [serverless-react-boilerplate](https://github.com/serverless/examples/tree/master/) <br/> A serverless react boilerplate for offline development | unknown |
| [serverless-delivery-framework](https://github.com/serverless/examples/tree/master/) <br/> This is a boilerplate for version release pipeline with serverless framework | unknown |
| [serverless-mailgun-slack](https://github.com/serverless/examples/tree/master/) <br/> A Serverless function for posting to a Slack Webhook in response to a Mailgun route | unknown |
| [serverless-AWS-Rekognition-finpics](https://github.com/serverless/examples/tree/master/) <br/> Use AWS Rekognition to provide a faces search of finpics.com | unknown |
| [jrestless-examples](https://github.com/serverless/examples/tree/master/) <br/> JRestless (Java / JAX-RS) examples for API Gateway Functions (plain JAX-RS), Spring, binary data requests/responses, custom authorizers and Cognito User Pool authorizers), SNS Functions) (asynchronous communication between functions) and Service Functions) (synchronous HTTP-like communication between functions - transparent through Feign) | unknown |
| [AWS API Gateway Serverless project written in Go](https://github.com/serverless/examples/tree/master/) <br/> A serverless project that contains an API Gateway endpoint powered by a Lambda function written in golang and built using [eawsy/aws-lambda-go-shim](https://github.com/eawsy/aws-lambda-go-shim). | unknown |
| [video-preview-and-analysis-service](https://github.com/serverless/examples/tree/master/) <br/> An event-driven service that generates labels using Amazon Rekognition and creates preview GIF animation from a video file. | unknown |
| [Serverless ES6/7 CRUD API](https://github.com/serverless/examples/tree/master/) <br/> Serverless Stack examples of backend CRUD APIs (DynamoDB + Lambda + API Gateway + Cognito User Pool authorizer) for React.js single-page app | unknown |
| [AWS Lambda Power Tuning (powered by Step Functions)](https://github.com/serverless/examples/tree/master/) <br/> Build a Step Functions state machine to optimize your AWS Lambda Function memory/power configuration. | unknown |
| [React & Stripe Serverless Ecommerce](https://github.com/serverless/examples/tree/master/) <br/> Serverless E-Commerce App with AWS Lambda, Stripe and React | unknown |
| [Run your Kubernetes Workloads on Amazon EC2 Spot Instances with Amazon EKS and Lambda - Part 2](https://github.com/serverless/examples/tree/master/) <br/> From this article you'll learn how to configure AWS Lambda functions to allow them manage your EKS Kubernetes cluster and run triggered jobs | unknown |
| [Serverless Dashboard For Atom Editor](https://github.com/serverless/examples/tree/master/) <br/> Atom editor package which allows you to deploy and visualize your serverless services with Serverless Framework on your editor. | unknown |
| [Serverless SSH Command](https://github.com/serverless/examples/tree/master/) <br/> Example of executing ssh command with OpenWhisk | unknown |
| [JSON-Serverless](https://github.com/serverless/examples/tree/master/) <br/> A simple & cheap serverless REST API using [json-server](https://github.com/typicode/json-server) in combination with AWS Lambda / S3 and the serverless framework | unknown |
| [[Unly] Boilerplates Generator](https://github.com/serverless/examples/tree/master/) <br/> A boilerplates generator, meant to help to quick-start Serverless (AWS Lambda/API GW) and OSS projects, using good defaults _(sentry for automated error handling, staging/prod environments, built-in support for env vars, jest support, babel/webpack)_, yet flexible to fit your needs. | unknown |
| [Demo project for serverless-migrate-plugin](https://github.com/serverless/examples/tree/master/) <br/> An example about how to use migrations in your serverless project with serverless-migrate-plugin | unknown |
| [GoLive](https://github.com/serverless/examples/tree/master/) <br/> Boilerplate to live stream using AWS MediaLive and MediaStore | unknown |
| [Idempotent Serverless Functions](https://github.com/serverless/examples/tree/master/) <br/> This repository demonstrates how to ensure the idempotence of serverless functions running on AWS Lambda. | unknown |
| [File uploads using S3 presigned URLs](https://github.com/serverless/examples/tree/master/) <br/> A Serverless photo upload service with API Gateway, S3 presigned URLs and Lambda. | unknown |
| [Monorepo Typescript microservices](https://github.com/serverless/examples/tree/master/) <br/> An opinionated Serverless template with several Typescript microservices in a monorepo | unknown |
| [Serverless Python Twitch EventSub to Discord Webhook on AWS](https://github.com/serverless/examples/tree/master/) <br/> This template takes go-live events from Twitch EventSub, and publishes the events through a Discord webhook | unknown |
<!-- AUTO-GENERATED-CONTENT:END -->
## Community Examples
[Add an example](https://github.com/serverless/examples/edit/master/community-examples.json)
To install any of these you can run:
```bash
serverless install -u https://github.com/author/project -n my-project
```
## Contributing
We are happy to accept more examples from the community. 🎉
### Adding example code
1. Make sure your contribution matches the linting setup for this repo:
Run the linting via
```bash
npm run lint
```
2. Add a `package.json` file in your example with the name of the example and a `description` and any `dependencies` used.
3. Regenerate the README.md with the following command
```bash
npm run docs
```
4. Open a new pull request with your example. ⚡️
### Adding a community example
We love hearing about projects happening in the community. Feel free to add your serverless project to our growing list.
1. Add `link`, `title`, and `description` to the [community-examples.json](https://github.com/serverless/examples/edit/master/community-examples.json) file.
2. Open a new pull request with your example. ⚡️
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/.gitignore
================================================
git node_modules
.serverless
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
nupkg/
# Visual Studio Code
.vscode
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
msbuild.log
msbuild.err
msbuild.wrn
# Visual Studio 2015
.vs/
env.configs.yml
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/DotNetServerless.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E45346EE-74B7-4F5B-943C-FEFDE57124D0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{DBC29D13-84FE-4A90-B785-E325BDD494A8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetServerless.Lambda", "src\DotNetServerless.Lambda\DotNetServerless.Lambda.csproj", "{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetServerless.Tests", "tests\DotNetServerless.Tests\DotNetServerless.Tests.csproj", "{045DC8E9-8CA6-4B76-9C4A-781AB9589700}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetServerless.Application", "src\DotNetServerless.Application\DotNetServerless.Application.csproj", "{8F0BB856-4F83-4898-ACC7-68D672386742}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Debug|x64.ActiveCfg = Debug|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Debug|x64.Build.0 = Debug|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Debug|x86.ActiveCfg = Debug|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Debug|x86.Build.0 = Debug|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Release|Any CPU.Build.0 = Release|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Release|x64.ActiveCfg = Release|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Release|x64.Build.0 = Release|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Release|x86.ActiveCfg = Release|Any CPU
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F}.Release|x86.Build.0 = Release|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Debug|Any CPU.Build.0 = Debug|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Debug|x64.ActiveCfg = Debug|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Debug|x64.Build.0 = Debug|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Debug|x86.ActiveCfg = Debug|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Debug|x86.Build.0 = Debug|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Release|Any CPU.ActiveCfg = Release|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Release|Any CPU.Build.0 = Release|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Release|x64.ActiveCfg = Release|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Release|x64.Build.0 = Release|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Release|x86.ActiveCfg = Release|Any CPU
{045DC8E9-8CA6-4B76-9C4A-781AB9589700}.Release|x86.Build.0 = Release|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Debug|x64.ActiveCfg = Debug|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Debug|x64.Build.0 = Debug|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Debug|x86.ActiveCfg = Debug|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Debug|x86.Build.0 = Debug|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Release|Any CPU.Build.0 = Release|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Release|x64.ActiveCfg = Release|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Release|x64.Build.0 = Release|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Release|x86.ActiveCfg = Release|Any CPU
{8F0BB856-4F83-4898-ACC7-68D672386742}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9A74B45A-50B6-44C8-A2D7-F7778A61F18F} = {E45346EE-74B7-4F5B-943C-FEFDE57124D0}
{045DC8E9-8CA6-4B76-9C4A-781AB9589700} = {DBC29D13-84FE-4A90-B785-E325BDD494A8}
{8F0BB856-4F83-4898-ACC7-68D672386742} = {E45346EE-74B7-4F5B-943C-FEFDE57124D0}
EndGlobalSection
EndGlobal
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/README.MD
================================================
<!--
title: 'Dot Net REST API with DynamoDB'
description: 'Setup a REST API w/ DynamoDB using Dot Net Core 2.1'
framework: v1
platform: AWS
language: CSharp
priority: 10
authorLink: 'https://github.com/samueleresca'
authorName: 'Samuele Resca'
authorAvatar: 'https://avatars0.githubusercontent.com/u/8921095?v=4&s=140'
-->
# DotNetServerless
The following AWS lambda is built in .NET Core 2.1
## Configure lambda
It is possible configure the lambda by editing the `env.config.yml` file:
```
feature: <feature_name>
version: 1.0.0.0
region: <aws_region>
environment: <environment>
accountId: <aws_account_id>
dynamoTable: <dynamo_table_name>
```
## Run
The project contains a `package.json` file with the following commands:
```
npm run tests
```
```
npm run build
```
```
npm run deploy
```
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/DotNetServerless.Application.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AWSSDK.DynamoDBv2" Version="3.3.14.12" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageReference Include="AWSSDK.Core" Version="3.3.29.3" />
<PackageReference Include="AWSSDK.Core" Version="3.3.29.3" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="2.1.1.0" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.1" />
</ItemGroup>
</Project>
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Entities/Item.cs
================================================
using Amazon.DynamoDBv2.DataModel;
namespace DotNetServerless.Application.Entities
{
public class Item
{
[DynamoDBHashKey]
public string Id { get; set; }
[DynamoDBRangeKey]
public string Code { get; set; }
[DynamoDBProperty]
public string Description { get; set; }
[DynamoDBProperty]
public bool IsChecked { get; set; }
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/CreateItemHandler.cs
================================================
using System;
using System.Threading;
using System.Threading.Tasks;
using DotNetServerless.Application.Entities;
using DotNetServerless.Application.Infrastructure.Repositories;
using DotNetServerless.Application.Requests;
using MediatR;
namespace DotNetServerless.Application.Handlers
{
public class CreateItemHandler : IRequestHandler<CreateItemRequest, Item>
{
private readonly IItemRepository _itemRepository;
public CreateItemHandler(IItemRepository itemRepository)
{
_itemRepository = itemRepository;
}
public async Task<Item> Handle(CreateItemRequest request, CancellationToken cancellationToken)
{
var item = request.Map();
item.Id = Guid.NewGuid().ToString();
await _itemRepository.Save(item, cancellationToken);
return item;
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/GetItemHandler.cs
================================================
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using DotNetServerless.Application.Entities;
using DotNetServerless.Application.Infrastructure.Repositories;
using DotNetServerless.Application.Requests;
using MediatR;
namespace DotNetServerless.Application.Handlers
{
public class GetItemHandler : IRequestHandler<GetItemRequest, Item>
{
private readonly IItemRepository _itemRepository;
public GetItemHandler(IItemRepository itemRepository)
{
_itemRepository = itemRepository;
}
public async Task<Item> Handle(GetItemRequest request, CancellationToken cancellationToken)
{
var result = await _itemRepository.GetById<Item>(request.Id.ToString(), cancellationToken);
return result.FirstOrDefault();
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/UpdateItemHandler.cs
================================================
using System.Threading;
using System.Threading.Tasks;
using DotNetServerless.Application.Entities;
using DotNetServerless.Application.Infrastructure.Repositories;
using DotNetServerless.Application.Requests;
using MediatR;
namespace DotNetServerless.Application.Handlers
{
public class UpdateItemHandler : IRequestHandler<UpdateItemRequest, Item>
{
private readonly IItemRepository _itemRepository;
public UpdateItemHandler(IItemRepository itemRepository)
{
_itemRepository = itemRepository;
}
public async Task<Item> Handle(UpdateItemRequest request, CancellationToken cancellationToken)
{
var item = request.Map();
await _itemRepository.Save(item, cancellationToken);
return item;
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/AWSClientFactory.cs
================================================
using System;
using Amazon.Runtime;
using DotNetServerless.Application.Infrastructure.Configs;
namespace DotNetServerless.Application.Infrastructure
{
public interface IAwsClientFactory<out T>
{
T GetAwsClient();
}
public class AwsClientFactory<T> : IAwsClientFactory<T> where T : AmazonServiceClient, new()
{
private readonly IAwsBasicConfiguration _awsBasicConfiguration;
public AwsClientFactory(AwsBasicConfiguration awsBasicConfiguration)
{
_awsBasicConfiguration = awsBasicConfiguration;
}
public T GetAwsClient()
{
return string.IsNullOrEmpty(_awsBasicConfiguration.AccessKey) ||
string.IsNullOrEmpty(_awsBasicConfiguration.SecretKey)
? (T) Activator.CreateInstance(typeof(T))
: (T) Activator.CreateInstance(typeof(T), _awsBasicConfiguration.GetAwsCredentials(),
_awsBasicConfiguration.RegionEndpoint);
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Configs/AwsBasicConfiguration.cs
================================================
using System;
using System.Linq;
using Amazon;
using Amazon.Runtime;
using Newtonsoft.Json;
namespace DotNetServerless.Application.Infrastructure.Configs
{
public interface IAwsBasicConfiguration
{
string SecretKey { get; }
string AccessKey { get; }
RegionEndpoint RegionEndpoint { get; }
BasicAWSCredentials GetAwsCredentials();
}
public class AwsBasicConfiguration : IAwsBasicConfiguration
{
private string Region { get; } = string.Empty;
public string SecretKey { get; set; }
public string AccessKey { get; set; }
public BasicAWSCredentials GetAwsCredentials()
{
if (string.IsNullOrEmpty(AccessKey) || string.IsNullOrEmpty(SecretKey)) return null;
return new BasicAWSCredentials(AccessKey, SecretKey);
}
[JsonIgnore]
public RegionEndpoint RegionEndpoint
{
get
{
return RegionEndpoint.EnumerableAllRegions.FirstOrDefault(x =>
x.SystemName.Equals(Region, StringComparison.InvariantCultureIgnoreCase));
}
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Configs/DynamoDbConfiguration.cs
================================================
namespace DotNetServerless.Application.Infrastructure.Configs
{
public class DynamoDbConfiguration
{
public string TableName { get; set; }
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Repositories/IItemRepository.cs
================================================
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using DotNetServerless.Application.Entities;
namespace DotNetServerless.Application.Infrastructure.Repositories
{
public interface IItemRepository
{
Task<IEnumerable<T>> GetById<T>(string id, CancellationToken cancellationToken);
Task Save(Item item, CancellationToken cancellationToken);
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Repositories/ItemDynamoRepository.cs
================================================
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Amazon.DynamoDBv2;
using Amazon.DynamoDBv2.DataModel;
using Amazon.DynamoDBv2.DocumentModel;
using DotNetServerless.Application.Entities;
using DotNetServerless.Application.Infrastructure.Configs;
namespace DotNetServerless.Application.Infrastructure.Repositories
{
public class ItemDynamoRepository : IItemRepository
{
private readonly AmazonDynamoDBClient _client;
private readonly DynamoDBOperationConfig _configuration;
public ItemDynamoRepository(DynamoDbConfiguration configuration,
IAwsClientFactory<AmazonDynamoDBClient> clientFactory)
{
_client = clientFactory.GetAwsClient();
_configuration = new DynamoDBOperationConfig
{
OverrideTableName = configuration.TableName,
SkipVersionCheck = true
};
}
public async Task Save(Item item, CancellationToken cancellationToken)
{
using (var context = new DynamoDBContext(_client))
{
await context.SaveAsync(item, _configuration, cancellationToken);
}
}
public async Task<IEnumerable<T>> GetById<T>(string id, CancellationToken cancellationToken)
{
var resultList = new List<T>();
using (var context = new DynamoDBContext(_client))
{
var scanCondition = new ScanCondition(nameof(Item.Id), ScanOperator.Equal, id);
var search = context.ScanAsync<T>(new[] { scanCondition }, _configuration);
while (!search.IsDone)
{
var entities = await search.GetNextSetAsync(cancellationToken);
resultList.AddRange(entities);
}
}
return resultList;
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/CreateItemRequest.cs
================================================
using DotNetServerless.Application.Entities;
using MediatR;
namespace DotNetServerless.Application.Requests
{
public class CreateItemRequest : IRequest<Item>
{
public string Description { get; set; }
public string Code { get; set; }
public bool IsChecked { get; set; }
public Item Map()
{
return new Item
{
Description = Description,
Code = Code,
IsChecked = IsChecked
};
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/GetItemRequest.cs
================================================
using System;
using DotNetServerless.Application.Entities;
using MediatR;
namespace DotNetServerless.Application.Requests
{
public class GetItemRequest : IRequest<Item>
{
public Guid Id { get; set; }
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/UpdateItemRequest.cs
================================================
using DotNetServerless.Application.Entities;
using MediatR;
namespace DotNetServerless.Application.Requests
{
public class UpdateItemRequest : IRequest<Item>
{
public string Id { get; set; }
public string Description { get; set; }
public string Code { get; set; }
public bool IsChecked { get; set; }
public Item Map()
{
return new Item
{
Id = Id,
Description = Description,
Code = Code,
IsChecked = IsChecked
};
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Responses/ItemResponse.cs
================================================
using System;
namespace DotNetServerless.Application.Responses
{
public class ItemResponse
{
public Guid Id { get; set; }
public string Code { get; set; }
public string Description { get; set; }
public bool IsChecked { get; set; }
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/DotNetServerless.Lambda.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<AWSProjectType>Lambda</AWSProjectType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="1.1.3" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" />
<PackageReference Include="Amazon.Lambda.Logging.AspNetCore" Version="2.0.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.4.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.1.1" />
</ItemGroup>
<ItemGroup>
<DotNetCliToolReference Include="Amazon.Lambda.Tools" Version="2.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DotNetServerless.Application\DotNetServerless.Application.csproj" />
</ItemGroup>
<ItemGroup>
<Content Remove="package-lock.json" />
<None Include="package-lock.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
<Content Remove="package.json" />
<None Include="package.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Extensions/ServicesExtensions.cs
================================================
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetServerless.Lambda.Extensions
{
public static class ServiceCollectionExtensions
{
public static IServiceCollection BindAndConfigure<TConfig>(this IServiceCollection services,
IConfigurationSection section, TConfig config)
where TConfig : class, new()
{
section.Bind(config);
services.AddSingleton(config);
return services;
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/CreateItemFunction.cs
================================================
using System;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using DotNetServerless.Application.Requests;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
namespace DotNetServerless.Lambda.Functions
{
public class CreateItemFunction
{
private readonly IServiceProvider _serviceProvider;
public CreateItemFunction() : this(Startup
.BuildContainer()
.BuildServiceProvider())
{
}
public CreateItemFunction(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
[LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
public async Task<APIGatewayProxyResponse> Run(APIGatewayProxyRequest request)
{
var requestModel = JsonConvert.DeserializeObject<CreateItemRequest>(request.Body);
var mediator = _serviceProvider.GetService<IMediator>();
var result = await mediator.Send(requestModel);
return new APIGatewayProxyResponse { StatusCode = 201, Body = JsonConvert.SerializeObject(result)};
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/GetItemFunction.cs
================================================
using System;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using DotNetServerless.Application.Requests;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
namespace DotNetServerless.Lambda.Functions
{
public class GetItemFunction
{
private readonly IServiceProvider _serviceProvider;
public GetItemFunction() : this(Startup
.BuildContainer()
.BuildServiceProvider())
{
}
public GetItemFunction(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
[LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
public async Task<APIGatewayProxyResponse> Run(APIGatewayProxyRequest request)
{
var requestModel = new GetItemRequest {Id = new Guid(request.PathParameters["id"])};
var mediator = _serviceProvider.GetService<IMediator>();
var result = await mediator.Send(requestModel);
return result == null ?
new APIGatewayProxyResponse {StatusCode = 404} :
new APIGatewayProxyResponse { StatusCode = 200, Body = JsonConvert.SerializeObject(result)};
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/UpdateItemFunction.cs
================================================
using System;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using Amazon.Lambda.Core;
using DotNetServerless.Application.Requests;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
namespace DotNetServerless.Lambda.Functions
{
public class UpdateItemFunction
{
private readonly IServiceProvider _serviceProvider;
public UpdateItemFunction() : this(Startup
.BuildContainer()
.BuildServiceProvider())
{
}
public UpdateItemFunction(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
[LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializer))]
public async Task<APIGatewayProxyResponse> Run(APIGatewayProxyRequest request)
{
var requestModel = JsonConvert.DeserializeObject<UpdateItemRequest>(request.Body);
var mediator = _serviceProvider.GetService<IMediator>();
var result = await mediator.Send(requestModel);
return new APIGatewayProxyResponse { StatusCode = 200, Body = JsonConvert.SerializeObject(result)};
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Program.cs
================================================
namespace DotNetServerless.Lambda
{
public class Program
{
public static void Main(string[] args)
{
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Startup.cs
================================================
using System.IO;
using DotNetServerless.Application.Infrastructure;
using DotNetServerless.Application.Infrastructure.Configs;
using DotNetServerless.Application.Infrastructure.Repositories;
using DotNetServerless.Lambda.Extensions;
using MediatR;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
namespace DotNetServerless.Lambda
{
public class Startup
{
public static IServiceCollection BuildContainer()
{
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddEnvironmentVariables()
.Build();
return ConfigureServices(configuration);
}
private static IServiceCollection ConfigureServices(IConfigurationRoot configurationRoot)
{
var services = new ServiceCollection();
services
.AddMediatR()
.AddTransient(typeof(IAwsClientFactory<>), typeof(AwsClientFactory<>))
.AddTransient<IItemRepository, ItemDynamoRepository>()
.BindAndConfigure(configurationRoot.GetSection("DynamoDbConfiguration"), new DynamoDbConfiguration())
.BindAndConfigure(configurationRoot.GetSection("AwsBasicConfiguration"), new AwsBasicConfiguration());
return services;
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/package.json
================================================
{
"name": "aws-dotnet-rest-api-with-dynamodb",
"description": "Reading/Writing operations using .NET Core and DynamoDB",
"author": "Samuele Resca <samuele.resca@gmail.com>",
"version": "1.0.0",
"scripts": {
"build": "dotnet restore && dotnet lambda package --configuration release --framework netcoreapp2.1 --output-package bin/release/netcoreapp2.1/deploy-package.zip",
"test": " dotnet test ../../tests/DotNetServerless.Tests/DotNetServerless.Tests.csproj",
"deploy": "npm run build && npm run test && node_modules/.bin/serverless deploy --verbose"
},
"devDependencies": {
"serverless": "^1.33.2"
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/serverless.yml
================================================
service: ${file(env.configs.yml):feature}
frameworkVersion: ">=1.6.0 <2.1.0"
provider:
name: aws
stackName: ${file(env.configs.yml):feature}-${file(env.configs.yml):environment}
runtime: dotnetcore2.1
region: ${file(env.configs.yml):region}
accountId: ${file(env.configs.yml):accountId}
environment:
DynamoDbConfiguration__TableName: ${file(env.configs.yml):dynamoTable}
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:*
Resource: "arn:aws:dynamodb:${self:provider.region}:*:table/${self:provider.environment.DynamoDbConfiguration__TableName}"
package:
artifact: bin/release/netcoreapp2.1/deploy-package.zip
functions:
create:
handler: DotNetServerless.Lambda::DotNetServerless.Lambda.Functions.CreateItemFunction::Run
events:
- http:
path: items
method: post
cors: true
get:
handler: DotNetServerless.Lambda::DotNetServerless.Lambda.Functions.GetItemFunction::Run
events:
- http:
path: items/{id}
method: get
cors: true
update:
handler: DotNetServerless.Lambda::DotNetServerless.Lambda.Functions.UpdateItemFunction::Run
events:
- http:
path: items
method: put
cors: true
resources:
Resources:
ItemsDynamoDbTable:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: Retain
Properties:
AttributeDefinitions:
- AttributeName: Id
AttributeType: S
- AttributeName: Code
AttributeType: S
KeySchema:
- AttributeName: Id
KeyType: HASH
- AttributeName: Code
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
TableName: ${self:provider.environment.DynamoDbConfiguration__TableName}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/DotNetServerless.Tests.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
<PackageReference Include="Moq" Version="4.10.0" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\DotNetServerless.Lambda\DotNetServerless.Lambda.csproj" />
</ItemGroup>
</Project>
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/CreateItemFunctionTests.cs
================================================
using System.Threading;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using DotNetServerless.Application.Entities;
using DotNetServerless.Application.Infrastructure.Repositories;
using DotNetServerless.Application.Requests;
using DotNetServerless.Lambda;
using DotNetServerless.Lambda.Functions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Moq;
using Newtonsoft.Json;
using Xunit;
namespace DotNetServerless.Tests.Functions
{
public class CreateItemFunctionTests
{
public CreateItemFunctionTests()
{
_mockRepository = new Mock<IItemRepository>();
_mockRepository.Setup(_ => _.Save(It.IsAny<Item>(), It.IsAny<CancellationToken>())).Returns(Task.CompletedTask);
var serviceCollection = Startup.BuildContainer();
serviceCollection.Replace(new ServiceDescriptor(typeof(IItemRepository), _ => _mockRepository.Object,
ServiceLifetime.Transient));
_sut = new CreateItemFunction(serviceCollection.BuildServiceProvider());
}
private readonly CreateItemFunction _sut;
private readonly Mock<IItemRepository> _mockRepository;
[Fact]
public async Task run_should_trigger_mediator_handler_and_repository()
{
await _sut.Run(new APIGatewayProxyRequest {Body = JsonConvert.SerializeObject(new CreateItemRequest())});
_mockRepository.Verify(_ => _.Save(It.IsAny<Item>(), It.IsAny<CancellationToken>()), Times.Once);
}
[Theory]
[InlineData(201)]
public async Task run_should_return_201_created(int statusCode)
{
var result = await _sut.Run(new APIGatewayProxyRequest {Body = JsonConvert.SerializeObject(new CreateItemRequest())});
Assert.Equal(result.StatusCode, statusCode);
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/GetItemFunctionTests.cs
================================================
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Amazon.Lambda.APIGatewayEvents;
using DotNetServerless.Application.Entities;
using DotNetServerless.Application.Infrastructure.Repositories;
using DotNetServerless.Lambda;
using DotNetServerless.Lambda.Functions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Moq;
using Xunit;
namespace DotNetServerless.Tests.Functions
{
public class GetItemFunctionTests
{
public GetItemFunctionTests()
{
_mockRepository = new Mock<IItemRepository>();
_mockRepository.Setup(_ => _.GetById<Item>(It.IsAny<string>(), It.IsAny<CancellationToken>())).ReturnsAsync(new List<Item>{ new Item{ Id = Guid.NewGuid().ToString()}});
var serviceCollection = Startup.BuildContainer();
serviceCollection.Replace(new ServiceDescriptor(typeof(IItemRepository), _ => _mockRepository.Object,
ServiceLifetime.Transient));
_sut = new GetItemFunction(serviceCollection.BuildServiceProvider());
}
private readonly GetItemFunction _sut;
private readonly Mock<IItemRepository> _mockRepository;
[Fact]
public async Task run_should_trigger_mediator_handler_and_repository()
{
await _sut.Run(new APIGatewayProxyRequest{ PathParameters = new Dictionary<string, string>
{
{ "id", Guid.NewGuid().ToString()}
}});
_mockRepository.Verify(_ => _.GetById<Item>(It.IsAny<string>(), It.IsAny<CancellationToken>()), Times.Once);
}
[Theory]
[InlineData(200)]
public async Task run_should_return_200_when_find_the_record(int statusCode)
{
var result = await _sut.Run(new APIGatewayProxyRequest{ PathParameters = new Dictionary<string, string>
{
{ "id", Guid.NewGuid().ToString()}
}});
Assert.Equal(result.StatusCode, statusCode);
}
[Theory]
[InlineData(404)]
public async Task run_should_return_404_when_NOT_find_the_record(int statusCode)
{
_mockRepository.Setup(_ => _.GetById<Item>(It.IsAny<string>(), It.IsAny<CancellationToken>()))
.ReturnsAsync(new List<Item>());
var result = await _sut.Run(new APIGatewayProxyRequest{ PathParameters = new Dictionary<string, string>
{
{ "id", Guid.NewGuid().ToString()}
}});
Assert.Equal(result.StatusCode, statusCode);
}
}
}
================================================
FILE: aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/UpdateItemFunctionTests.cs
================================================
using System.Threading;
using System.Threading.Tasks;
using Amazon.DynamoDBv2.Model;
using Amazon.Lambda.APIGatewayEvents;
using DotNetServerless.Application.Entities;
using DotNetServerless.Application.Infrastructure.Repositories;
using DotNetServerless.Lambda;
using DotNetServerless.Lambda.Functions;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Moq;
using Newtonsoft.Json;
using Xunit;
namespace DotNetServerless.Tests.Functions
{
public class UpdateItemFunctionTests
{
public UpdateItemFunctionTests()
{
_mockRepository = new Mock<IItemRepository>();
_mockRepository.Setup(_ => _.Save(It.IsAny<Item>(), It.IsAny<CancellationToken>())).Returns(Task.CompletedTask);
var serviceCollection = Startup.BuildContainer();
serviceCollection.Replace(new ServiceDescriptor(typeof(IItemRepository), _ => _mockRepository.Object,
ServiceLifetime.Transient));
_sut = new UpdateItemFunction(serviceCollection.BuildServiceProvider());
}
private readonly UpdateItemFunction _sut;
private readonly Mock<IItemRepository> _mockRepository;
[Fact]
public async Task run_should_trigger_mediator_handler_and_repository()
{
await _sut.Run(new APIGatewayProxyRequest{ Body = JsonConvert.SerializeObject(new UpdateItemRequest())});
_mockRepository.Verify(_ => _.Save(It.IsAny<Item>(), It.IsAny<CancellationToken>()), Times.Once);
}
[Theory]
[InlineData(200)]
public async Task run_should_return_200_when_updates(int statusCode)
{
var result = await _sut.Run(new APIGatewayProxyRequest {Body = JsonConvert.SerializeObject(new UpdateItemRequest())});
Assert.Equal(result.StatusCode, statusCode);
}
}
}
================================================
FILE: aws-ffmpeg-layer/.gitignore
================================================
.serverless/
node_modules/
layer/
================================================
FILE: aws-ffmpeg-layer/README.md
================================================
<!--
title: .'AWS FFmepg Layer'
description: 'AWS FFmepg Layer & a service using it to create GIFs'
framework: v1
platform: AWS
language: nodeJS
priority: 10
authorLink: 'https://github.com/tdhopper'
authorName: 'Timothy Hopper'
authorAvatar: 'https://avatars0.githubusercontent.com/u/611122?v=4&s=140'
-->
# AWS FFmepg Layer & a service using it to create GIFs
```
git clone https://github.com/serverless/examples
cd examples/aws-ffmpeg-layer
./build.sh
sls deploy
```
See the blog post about this example for more details:
https://serverless.com/blog/publish-aws-lambda-layers-serverless-framework/
================================================
FILE: aws-ffmpeg-layer/build.sh
================================================
#!/bin/bash
mkdir -p layer
cd layer
rm -rf *
curl -O https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz
tar -xf ffmpeg-git-amd64-static.tar.xz
mv ffmpeg-git-*-amd64-static ffmpeg
rm ffmpeg-git-amd64-static.tar.xz
================================================
FILE: aws-ffmpeg-layer/handler.js
================================================
const { spawnSync } = require("child_process");
const { readFileSync, writeFileSync, unlinkSync } = require("fs");
const AWS = require("aws-sdk");
const s3 = new AWS.S3();
module.exports.mkgif = async (event, context) => {
if (!event.Records) {
console.log("not an s3 invocation!");
return;
}
for (const record of event.Records) {
if (!record.s3) {
console.log("not an s3 invocation!");
continue;
}
if (record.s3.object.key.endsWith(".gif")) {
console.log("already a gif");
continue;
}
// get the file
const s3Object = await s3
.getObject({
Bucket: record.s3.bucket.name,
Key: record.s3.object.key
})
.promise();
// write file to disk
writeFileSync(`/tmp/${record.s3.object.key}`, s3Object.Body);
// convert to gif!
spawnSync(
"/opt/ffmpeg/ffmpeg",
[
"-i",
`/tmp/${record.s3.object.key}`,
"-f",
"gif",
`/tmp/${record.s3.object.key}.gif`
],
{ stdio: "inherit" }
);
// read gif from disk
const gifFile = readFileSync(`/tmp/${record.s3.object.key}.gif`);
// delete the temp files
unlinkSync(`/tmp/${record.s3.object.key}.gif`);
unlinkSync(`/tmp/${record.s3.object.key}`);
// upload gif to s3
await s3
.putObject({
Bucket: record.s3.bucket.name,
Key: `${record.s3.object.key}.gif`,
Body: gifFile
})
.promise();
}
};
================================================
FILE: aws-ffmpeg-layer/package.json
================================================
{
"name": "aws-lambda-layer",
"description": "",
"version": "0.1.0",
"dependencies": {},
"devDependencies": {}
}
================================================
FILE: aws-ffmpeg-layer/serverless.yml
================================================
service: gifmaker
frameworkVersion: ">=2.24.0"
provider:
name: aws
runtime: nodejs12.x
iamRoleStatements:
- Effect: Allow
Action:
- s3:PutObject
- s3:GetObject
Resource: "arn:aws:s3:::${self:custom.bucket}/*"
functions:
mkgif:
handler: handler.mkgif
events:
- s3: ${self:custom.bucket}
layers:
- {Ref: FfmpegLambdaLayer}
layers:
ffmpeg:
path: layer
custom:
bucket: ${env:BUCKET, 'ffmpeg-layer-gif-maker'}
================================================
FILE: aws-golang-auth-examples/.gitignore
================================================
bin/**
vendor
.serverless
*.coverprofile
================================================
FILE: aws-golang-auth-examples/Makefile
================================================
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
functions := $(shell find functions -name \*main.go | awk -F'/' '{print $$2}')
build: ## Build golang binaries
@for function in $(functions) ; do \
env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/$$function functions/$$function/main.go ; \
done
================================================
FILE: aws-golang-auth-examples/README.md
================================================
<!--
title: .'AWS Golang Auth'
description: 'This example shows you how to setup auth in front of a AWS Lambda function'
framework: v1
platform: AWS
language: Go
priority: 10
authorLink: 'https://github.com/srbry'
authorName: 'srbry'
authorAvatar: 'https://avatars0.githubusercontent.com/u/16936753?v=4&s=140'
-->
# Go Serverless Examples
A few example of AWS lambda functions written in GoLang.
Functions:
- `hello-world`: Exactly what is says on the tin. Listening on a `/hello` path.
- `auth`: An AWS API Gateway custom authorizer that sits in front of `hello-world`. It expects an auth bearer of `hello` as a header and is on the base `/` path. The auth header should be `Authorization: bearer hello`
- `auth2` and `hello-world2`: The same as `auth` above except using auth contexts. Any name can be used as a bearer token, for example `Authorization: bearer Bob`. The response will then return `Hello, Bob!`
I hope to add to these examples over time, if you have ideas please feel free to raise issues or pull requests.
For more info on these example check out the [blog post](https://cloudnative.ly/lambdas-with-golang-a-technical-guide-6f381284897b)
================================================
FILE: aws-golang-auth-examples/functions/auth/auth_suite_test.go
================================================
package main_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestAuth(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Auth Suite")
}
================================================
FILE: aws-golang-auth-examples/functions/auth/main.go
================================================
package main
import (
"errors"
"strings"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
func handler(request events.APIGatewayCustomAuthorizerRequest) (events.APIGatewayCustomAuthorizerResponse, error) {
token := request.AuthorizationToken
tokenSlice := strings.Split(token, " ")
var bearerToken string
if len(tokenSlice) > 1 {
bearerToken = tokenSlice[len(tokenSlice)-1]
}
if bearerToken != "hello" {
return events.APIGatewayCustomAuthorizerResponse{}, errors.New("Unauthorized")
}
return generatePolicy("user", "Allow", request.MethodArn), nil
}
func main() {
lambda.Start(handler)
}
func generatePolicy(principalID, effect, resource string) events.APIGatewayCustomAuthorizerResponse {
authResponse := events.APIGatewayCustomAuthorizerResponse{PrincipalID: principalID}
if effect != "" && resource != "" {
authResponse.PolicyDocument = events.APIGatewayCustomAuthorizerPolicy{
Version: "2012-10-17",
Statement: []events.IAMPolicyStatement{
{
Action: []string{"execute-api:Invoke"},
Effect: effect,
Resource: []string{resource},
},
},
}
}
return authResponse
}
================================================
FILE: aws-golang-auth-examples/functions/auth/main_test.go
================================================
package main
import (
"github.com/aws/aws-lambda-go/events"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("the auth function", func() {
var (
response events.APIGatewayCustomAuthorizerResponse
request events.APIGatewayCustomAuthorizerRequest
err error
)
JustBeforeEach(func() {
response, err = handler(request)
})
AfterEach(func() {
request = events.APIGatewayCustomAuthorizerRequest{}
response = events.APIGatewayCustomAuthorizerResponse{}
})
Context("When the auth bearer is not set", func() {
It("Fails auth", func() {
Expect(err).To(MatchError("Unauthorized"))
Expect(response).To(Equal(events.APIGatewayCustomAuthorizerResponse{}))
})
})
Context("When the auth bearer is set", func() {
Context("and auth fails", func() {
BeforeEach(func() {
request = events.APIGatewayCustomAuthorizerRequest{
AuthorizationToken: "bearer token",
MethodArn: "testARN",
}
})
It("Fails auth", func() {
Expect(err).To(MatchError("Unauthorized"))
Expect(response).To(Equal(events.APIGatewayCustomAuthorizerResponse{}))
})
})
Context("and auth succeeds", func() {
BeforeEach(func() {
request = events.APIGatewayCustomAuthorizerRequest{
AuthorizationToken: "bearer hello",
MethodArn: "testARN",
}
})
It("authorizes", func() {
Expect(err).To(BeNil())
Expect(response.PolicyDocument.Version).To(Equal("2012-10-17"))
Expect(response.PolicyDocument.Statement).To(Equal([]events.IAMPolicyStatement{
{
Action: []string{"execute-api:Invoke"},
Effect: "Allow",
Resource: []string{"testARN"},
},
}))
})
})
})
})
================================================
FILE: aws-golang-auth-examples/functions/auth2/auth_suite_test.go
================================================
package main_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestAuth(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Auth Suite")
}
================================================
FILE: aws-golang-auth-examples/functions/auth2/main.go
================================================
package main
import (
"errors"
"strings"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
func handler(request events.APIGatewayCustomAuthorizerRequest) (events.APIGatewayCustomAuthorizerResponse, error) {
token := request.AuthorizationToken
tokenSlice := strings.Split(token, " ")
var bearerToken string
if len(tokenSlice) > 1 {
bearerToken = tokenSlice[len(tokenSlice)-1]
}
if bearerToken == "" {
return events.APIGatewayCustomAuthorizerResponse{}, errors.New("Unauthorized")
}
return generatePolicy("user", "Allow", request.MethodArn, map[string]interface{}{"name": bearerToken}), nil
}
func main() {
lambda.Start(handler)
}
func generatePolicy(principalID, effect, resource string, context map[string]interface{}) events.APIGatewayCustomAuthorizerResponse {
authResponse := events.APIGatewayCustomAuthorizerResponse{PrincipalID: principalID}
if effect != "" && resource != "" {
authResponse.PolicyDocument = events.APIGatewayCustomAuthorizerPolicy{
Version: "2012-10-17",
Statement: []events.IAMPolicyStatement{
{
Action: []string{"execute-api:Invoke"},
Effect: effect,
Resource: []string{resource},
},
},
}
}
authResponse.Context = context
return authResponse
}
================================================
FILE: aws-golang-auth-examples/functions/auth2/main_test.go
================================================
package main
import (
"github.com/aws/aws-lambda-go/events"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("the auth function", func() {
var (
response events.APIGatewayCustomAuthorizerResponse
request events.APIGatewayCustomAuthorizerRequest
err error
)
JustBeforeEach(func() {
response, err = handler(request)
})
AfterEach(func() {
request = events.APIGatewayCustomAuthorizerRequest{}
response = events.APIGatewayCustomAuthorizerResponse{}
})
Context("When the auth bearer is not set", func() {
It("Fails auth", func() {
Expect(err).To(MatchError("Unauthorized"))
Expect(response).To(Equal(events.APIGatewayCustomAuthorizerResponse{}))
})
})
Context("When the auth bearer is set", func() {
Context("and auth succeeds", func() {
BeforeEach(func() {
request = events.APIGatewayCustomAuthorizerRequest{
AuthorizationToken: "bearer Bob",
MethodArn: "testARN",
}
})
It("authorizes", func() {
Expect(err).To(BeNil())
Expect(response.PolicyDocument.Version).To(Equal("2012-10-17"))
Expect(response.PolicyDocument.Statement).To(Equal([]events.IAMPolicyStatement{
{
Action: []string{"execute-api:Invoke"},
Effect: "Allow",
Resource: []string{"testARN"},
},
}))
Expect(response.Context["name"]).To(Equal("Bob"))
})
})
})
})
================================================
FILE: aws-golang-auth-examples/functions/hello-world/hello_world_suite_test.go
================================================
package main_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestHelloWorld(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "HelloWorld Suite")
}
================================================
FILE: aws-golang-auth-examples/functions/hello-world/main.go
================================================
package main
import (
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
return events.APIGatewayProxyResponse{
Body: "Hello, World!",
StatusCode: 200,
}, nil
}
func main() {
lambda.Start(handler)
}
================================================
FILE: aws-golang-auth-examples/functions/hello-world/main_test.go
================================================
package main
import (
"net/http"
"github.com/aws/aws-lambda-go/events"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Hello world", func() {
var (
response events.APIGatewayProxyResponse
request events.APIGatewayProxyRequest
err error
)
JustBeforeEach(func() {
response, err = handler(request)
Expect(err).To(BeNil())
})
It(`Returns "Hello, World!" and an OK status`, func() {
Expect(response.Body).To(Equal("Hello, World!"))
Expect(response.StatusCode).To(Equal(http.StatusOK))
})
})
================================================
FILE: aws-golang-auth-examples/functions/hello-world2/hello_world_suite_test.go
================================================
package main_test
import (
"testing"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestHelloWorld(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "HelloWorld Suite")
}
================================================
FILE: aws-golang-auth-examples/functions/hello-world2/main.go
================================================
package main
import (
"fmt"
"net/http"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
var name string
if _, ok := request.RequestContext.Authorizer["name"]; ok {
name = request.RequestContext.Authorizer["name"].(string)
} else {
return events.APIGatewayProxyResponse{
Body: "Unauthorized: Must be an authorized user with a name",
StatusCode: http.StatusUnauthorized,
}, nil
}
return events.APIGatewayProxyResponse{
Body: fmt.Sprintf("Hello, %s!", name),
StatusCode: http.StatusOK,
}, nil
}
func main() {
lambda.Start(handler)
}
================================================
FILE: aws-golang-auth-examples/functions/hello-world2/main_test.go
================================================
package main
import (
"net/http"
"github.com/aws/aws-lambda-go/events"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Hello world", func() {
var (
response events.APIGatewayProxyResponse
request events.APIGatewayProxyRequest
err error
)
JustBeforeEach(func() {
response, err = handler(request)
Expect(err).To(BeNil())
})
AfterEach(func() {
request.RequestContext = events.APIGatewayProxyRequestContext{}
})
Context("When the user is not authorized with a name", func() {
It(`Returns unauthorized`, func() {
Expect(response.Body).To(Equal("Unauthorized: Must be an authorized user with a name"))
Expect(response.StatusCode).To(Equal(http.StatusUnauthorized))
})
})
Context("When the user is authorized with a name", func() {
BeforeEach(func() {
request.RequestContext.Authorizer = map[string]interface{}{
"name": "Bob",
}
})
It(`Returns "Hello, World!" and an OK status`, func() {
Expect(response.Body).To(Equal("Hello, Bob!"))
Expect(response.StatusCode).To(Equal(http.StatusOK))
})
})
})
================================================
FILE: aws-golang-auth-examples/go.mod
================================================
module github.com/srbry/go-serverless-example
require (
github.com/aws/aws-lambda-go v1.6.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/onsi/ginkgo v1.6.0
github.com/onsi/gomega v1.4.2
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2 // indirect
golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3 // indirect
golang.org/x/sys v0.0.0-20180928133829-e4b3c5e90611 // indirect
)
================================================
FILE: aws-golang-auth-examples/go.sum
================================================
github.com/aws/aws-lambda-go v1.6.0 h1:T+u/g79zPKw1oJM7xYhvpq7i4Sjc0iVsXZUaqRVVSOg=
github.com/aws/aws-lambda-go v1.6.0/go.mod h1:zUsUQhAUjYzR8AuduJPCfhBuKWUaDbQiPOG+ouzmE1A=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.2 h1:3mYCb7aPxS/RU7TI1y4rkEn1oKmPRjNJLNEXgw7MH2I=
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3 h1:dgd4x4kJt7G4k4m93AYLzM8Ni6h2qLTfh9n9vXJT3/0=
golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180928133829-e4b3c5e90611 h1:O33LKL7WyJgjN9CvxfTIomjIClbd/Kq86/iipowHQU0=
golang.org/x/sys v0.0.0-20180928133829-e4b3c5e90611/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
================================================
FILE: aws-golang-auth-examples/package.json
================================================
{
"name": "aws-golang-auth-examples",
"version": "1.0.0",
"description": "These example shows how to run a Golang lambda with authentication",
"main": "",
"keywords": [
"Go",
"serverless",
"aws",
"dynamodb",
"auth",
"tdd",
"test",
"testing"
],
"author": "Sam Bryant <srbry@hotmail.com>",
"license": "MIT",
"devDependencies": {
"serverless": "^1.30.3"
}
}
================================================
FILE: aws-golang-auth-examples/serverless.yml
================================================
service: hello-world
provider:
name: aws
runtime: go1.x
region: eu-west-1
memorySize: 128
package:
exclude:
- ./**
include:
- ./bin/**
functions:
authorize:
handler: bin/auth
authorize2:
handler: bin/auth2
hello-world:
handler: bin/hello-world
events:
- http:
path: /hello
method: get
- http:
path: /
method: get
authorizer:
name: authorize
resultTtlInSeconds: 0
hello-world2:
handler: bin/hello-world2
events:
- http:
path: me
method: get
authorizer:
name: authorize2
resultTtlInSeconds: 0
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/Gopkg.toml
================================================
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[[constraint]]
name = "github.com/aws/aws-lambda-go"
version = "1.4.0"
[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.15.13"
[[constraint]]
name = "github.com/olivere/elastic"
version = "6.1.27"
[[constraint]]
name = "github.com/satori/go.uuid"
version = "1.2.0"
[prune]
go-tests = true
unused-packages = true
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/Makefile
================================================
build:
dep ensure -v
env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/aws-golang-dynamo-stream-to-elasticsearch cmd/aws-golang-dynamo-stream-to-elasticsearch/main.go
.PHONY: clean
clean:
rm -rf ./bin ./vendor Gopkg.lock
.PHONY: deploy
deploy: clean build
sls deploy --verbose
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/README.md
================================================
<!--
title: .'DynamoDB Stream To Elasticsearch'
description: 'Stream data from DynamoDB to Elasticsearch'
framework: v1
platform: AWS
language: Go
priority: 10
authorLink: 'https://github.com/jalie'
authorName: 'Jan Liesendahl'
authorAvatar: 'https://avatars0.githubusercontent.com/u/548657?v=4&s=140'
-->
# DynamoDB Stream To Elasticsearch
## Deploying cloud information costs $$, Elasticsearch is not part of the free tier, as such please deploy with caution.
This serverless project acts as an example for:
* Creating a DynamoDB Table via Cloudformation
* Creating a single-node Elasticsearch Cluster via Cloudformation
* Creating a generic Go function which maps the keyspace from DynamoDB to Elasticsearch
As with all serverless projects, you must have severless installed! Listed here is a good way to get set up!
[https://github.com/serverless/serverless#quick-start](https://github.com/serverless/serverless#quick-start)
Once you have serverless installed on your system run these commands to get the project set up.
```
cd aws-golang-dynamo-stream-to-elasticsearch
npm install
make
./node_modules/serverless/bin/serverless deploy
# or if you've installed serverless globally
# sls deploy
```
This particular example will take ~15 minutes to deploy (Elasticsearch takes some time).
Grab a coffee and sit back! <sup>1</sup>
<sup>1</sup>
In production the deployment of persistent data stores (dynamodb, rds variants, elasticsearch)
should be decoupled from application code
## Seeding Your DynamoDB Table with Data
```
go run cmd/seed-dynamo/main.go --table-name="$YOUR_TABLE_NAME"
```
Once data is written to Dynamo, your lambda function will trigger the DynamoDB Stream events and data should begin to flow into Elasticsearch.
You should be able to create a Kibana index by navigating to your Kibana endpoint (found in the AWS Console) and clicking on the management tab. You should see something like this:

Follow the instructions to create the index, and you should now be able to query your data like so:

## Access Policy for Kibana
The Example itself is running without any further Policy definition, since the Lambda execution role has access to the ES endpoint.
However, if you want to access Kibana with your Browser - there is an additonal definition needed.
Possible restrictions can be done with aws cognito user auth, aws user auth, IP based or open access (not recommended):
e.g. with ip restriction:
```
AccessPolicies:
Version: "2012-10-17"
Statement:
-
Effect: "Allow"
Principal:
AWS: "*"
Action: "es:*"
Resource: "*"
Condition:
IpAddress:
aws:sourceIp:
- "123.123.123.123"
```
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/cmd/aws-golang-dynamo-stream-to-elasticsearch/main.go
================================================
package main
import (
"fmt"
"os"
"strings"
"github.com/olivere/elastic"
"github.com/serverless/examples/aws-golang-dynamo-stream-to-elasticsearch/dstream"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
)
var awsSession = session.Must(session.NewSession(&aws.Config{}))
var dynamoSvc = dynamodb.New(awsSession)
var esclient = new(dstream.Elasticsearch)
func handler(e events.DynamoDBEvent) error {
var item map[string]events.DynamoDBAttributeValue
fmt.Println("Beginning ES Sync")
for _, v := range e.Records {
switch v.EventName {
case "INSERT":
fallthrough
case "MODIFY":
tableName := strings.Split(v.EventSourceArn, "/")[1]
item = v.Change.NewImage
details, err := (&dstream.DynamoDetails{
DynamoDBAPI: dynamoSvc,
}).Get(tableName)
if err != nil {
return err
}
svc, err := elastic.NewClient(
elastic.SetSniff(false),
elastic.SetURL(fmt.Sprintf("https://%s", os.Getenv("ELASTICSEARCH_URL"))),
)
if err != nil {
return err
}
esclient.Client = svc
resp, err := esclient.Update(details, item)
if err != nil {
return err
}
fmt.Println(resp.Result)
default:
}
}
return nil
}
func main() {
lambda.Start(handler)
}
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/cmd/seed-dynamo/main.go
================================================
package main
import (
"flag"
"fmt"
"math/rand"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
)
func init() {
rand.Seed(time.Now().UTC().UnixNano())
}
type puppy struct {
ID string `json:"id"`
Name string `json:"name"`
Age float64 `json:"age"`
Weight string `json:"weight"`
PrimaryColor string `json:"primaryColor"`
SecondaryColor string `json:"secondaryColor"`
Owner string `json:"owner"`
Location string `json:"location"`
Motto string `json:"motto"`
Breed string `json:"breed"`
}
func main() {
tableName := flag.String("table-name", "", "Table Name is the name of the table to seed with data")
flag.Parse()
if tableName == nil {
panic("no table name given")
}
var (
N = 100
p *puppy
puppyMaxIndex = len(puppyNames)
humanMaxIndex = len(humanNames)
colorMaxIndex = len(colors)
locationMaxIndex = len(locations)
breedMaxIndex = len(breeds)
maxWeight = 40
maxAge = 20
)
session := session.Must(session.NewSession(&aws.Config{Region: aws.String("us-east-1")}))
svc := dynamodb.New(session)
for N > 0 {
p = &puppy{
Name: puppyNames[rand.Intn(puppyMaxIndex)],
PrimaryColor: colors[rand.Intn(colorMaxIndex)],
SecondaryColor: colors[rand.Intn(colorMaxIndex)],
Owner: humanNames[rand.Intn(humanMaxIndex)],
Location: locations[rand.Intn(locationMaxIndex)],
Weight: fmt.Sprintf("%dlb", rand.Intn(maxWeight)+2),
Motto: "Woof Woof!",
Age: float64(rand.Intn(maxAge)),
Breed: breeds[rand.Intn(breedMaxIndex)],
}
p.ID = uuid.NewV4().String()
avm, err := dynamodbattribute.MarshalMap(p)
if err != nil {
fmt.Println(err.Error())
} else {
_, err := svc.PutItem(&dynamodb.PutItemInput{
Item: avm,
TableName: aws.String("puppies"),
})
if err != nil {
fmt.Println(err.Error())
}
}
N--
}
}
var colors = []string{"white", "black", "red", "golden", "black", "brown"}
var humanNames = []string{"Hannelore Croswell",
"Grazyna Keep",
"Edison Sterrett",
"Darby Paxton",
"Meagan Tope",
"Alonso Bourassa",
"Malika Province",
"Penni Heeren",
"Pamula Nealey",
"Janette Vanderwal",
"Kourtney Backman",
"Thea Cathcart",
"Annie Vanscyoc",
"Alene Hillman",
"Wen Ardis",
"Candance Bohlen",
"Elidia Delosreyes",
"Octavio Byford",
"Donetta Lake",
"Eufemia Kwak",
"Treena Bona",
"Lennie Crowl",
"Tomasa Bonnie",
"Aisha Hensel",
"Shakia Releford",
"Artie Eubanks",
"Celsa Xie",
"Camie Santore",
"Fransisca Nourse",
"Palmer Czapla",
"Eneida Thor",
"Antony Wolpert",
"Pandora Binns",
"Nickie Foti",
"Ty Hasbrouck",
"Alexandria Varnadoe",
"Tim Amaro",
"Arnoldo Daugherty",
"Gwyn Schutz",
"Kenneth Nowlen",
"Isadora Plotkin",
"Daniele Chenault",
"Megan Hammons",
"Pennie Shilling",
"Holly Capers",
"Paige Swinton",
"Brianne Mean",
"Bonita Braud",
"Hassie Jarrells",
"Randa Schmid"}
var puppyNames = []string{"Max", "Bella", "Charlie",
"Lucy",
"Cooper",
"Daisy",
"Buddy",
"Luna",
"Jack",
"Lola",
"Rocky",
"Sadie",
"Bear",
"Molly",
"Tucker",
"Bailey",
"Oliver",
"Maggie",
"Duke",
"Sophie",
"Toby",
"Chloe",
"Bentley",
"Stella",
"Milo",
"Lily",
"Teddy",
"Penny",
"Leo",
"Zoey",
"Winston",
"Coco",
"Jax",
"Roxy",
"Zeus",
"Gracie",
"Louie",
"Mia",
"Murphy",
"Nala",
"Jake",
"Ruby",
"Dexter",
"Rosie",
"Riley",
"Ellie",
"Gus",
"Abby",
"Buster",
"Zoe",
"Harley",
"Piper",
"Bailey",
"Ginger",
"Jackson",
"Lilly",
"Henry",
"Lulu",
"Ollie",
"Riley",
"Oscar",
"Sasha",
"Finn",
"Lexi",
"Lucky",
"Pepper",
"Moose",
"Emma",
"Hank",
"Layla",
"Baxter",
"Maya",
"Bruno",
"Izzy",
"Diesel",
"Lady",
"Loki",
"Annie",
"Sam",
"Olive",
"Cody",
"Harley",
"Beau",
"Belle",
"Bandit",
"Dixie",
"Blue",
"Millie",
"Jasper",
"Willow",
"Apollo",
"Princess",
"Ace",
"Charlie",
"Sammy",
"Maddie",
"Thor",
"Kona",
"Gunner",
"Cali",
"Gizmo",
"Ella",
"Koda",
"Winnie",
"Shadow",
"Roxie",
"Scout",
"Marley",
"Brody",
"Cookie",
"Bo",
"Hazel",
"Marley",
"Scout",
"Simba",
"Athena",
"Roscoe",
"Callie",
"Otis",
"Phoebe",
"Rocco",
"Honey",
"Rex",
"Angel",
"George",
"Dakota",
"Hunter",
"Minnie",
"Tank",
"Holly",
"Luke",
"Missy",
"Ziggy",
"Sugar",
"Maverick",
"Shelby",
"Rusty",
"Nova",
"Boomer",
"Leia",
"Romeo",
"Josie",
"Tyson",
"Penelope",
"Chance",
"Ava",
"Benny",
"Gigi",
"Ranger",
"Peanut",
"Prince",
"Fiona",
"Oreo",
"Cleo",
"Bruce",
"Jasmine",
"Copper",
"Sandy",
"Benji",
"Mocha",
"Joey",
"Harper",
"Rudy",
"Macy",
"Samson",
"Sydney",
"Cash",
"Paisley",
"Peanut",
"Lacey",
"Frankie",
"Bonnie",
"Kobe",
"Baby",
"Coco",
"Mila",
"Chewy",
"Delilah",
"Chico",
"Pearl",
"Chase",
"Charlotte",
"Zeke",
"Trixie",
"King",
"Ivy",
"Chester",
"Nina",
"Odin",
"Heidi",
"Walter",
"Georgia",
"Brady",
"Shadow",
"Brutus",
"Xena",
"Mickey",
"Allie",
"Mac",
"Oreo"}
var locations = []string{"Alabama",
"Alaska",
"Arizona",
"Arkansas",
"California",
"Colorado",
"Connecticut",
"Delaware",
"Florida",
"Georgia",
"Hawaii",
"Idaho",
"Illinois",
"Indiana",
"Iowa",
"Kansas",
"Kentucky",
"Louisiana",
"Maine",
"Maryland",
"Massachusetts",
"Michigan",
"Minnesota",
"Mississippi",
"Missouri",
"Montana",
"Nebraska",
"Nevada",
"New Hampshire",
"New Jersey",
"New Mexico",
"New York",
"North Carolina",
"North Dakota",
"Ohio",
"Oklahoma",
"Oregon",
"Pennsylvania",
"Rhode Island",
"South Carolina",
"South Dakota",
"Tennessee",
"Texas",
"Utah",
"Vermont",
"Virginia",
"Washington",
"West Virginia",
"Wisconsin",
"Wyoming"}
var breeds = []string{"Affenpinscher",
"Afghan Hound",
"Airedale Terrier",
"Alaskan Malamute",
"American Staffordshire Bull Terrier",
"Anatolian Shepherd Dog",
"Australian Cattle Dog",
"Australian Kelpie",
"Australian Shepherd Dog",
"Australian Silky Terrier",
"Australian Terrier",
"Basenji",
"Basset Fauve de Bretagne",
"Basset Hound",
"Beagle",
"Bearded Collie",
"Bedlington Terrier",
"Belgian Shepherd Dog Groenendael",
"Belgian Shepherd Dog Laekenois",
"Belgian Shepherd Dog Malinois",
"Belgian Shepherd Dog Tervueren",
"Bernese Mountain Dog",
"Bichon Frise",
"Bloodhound",
"Border Collie",
"Border Terrier",
"Borzoi",
"Boston Terrier",
"Bouvier des Flandres",
"Boxer",
"Bracco Italiano",
"Briard",
"Brittany",
"Bull Terrier",
"Bull Terrier Miniature",
"Bulldog",
"Bullmastiff",
"Cairn Terrier",
"Cavalier King Charles Spaniel",
"Cesky Terrier",
"Chesapeake Bay Retriever",
"Chihuahua (Smooth Coat)",
"Chinese Crested",
"Chow Chow (Smooth)",
"Clumber Spaniel",
"Collie (Rough)",
"Collie (Smooth)",
"Curly-Coated Retriever",
"Dachshund (Miniature Long Haired)",
"Dachshund (Miniature Smooth Haired)",
"Dachshund (Miniature Wire Haired)",
"Dachshund (Smooth Haired)",
"Dachshund (Wire Haired)",
"Dalmatian",
"Dandie Dinmont Terrier",
"Deerhound",
"Dobermann",
"Dogue de Bordeaux",
"English Setter",
"English Springer Spaniel",
"English Toy Terrier (Black & Tan)",
"Field Spaniel",
"Finnish Lapphund",
"Finnish Spitz",
"Flat-Coated Retriever",
"Fox Terrier Smooth Coat",
"Fox Terrier Wire Coat",
"Foxhound",
"French Bulldog",
"German Shepherd Dog",
"German Short-Haired Pointer",
"German Spitz Klein",
"German Wire-Haired Pointer",
"Golden Retriever",
"Gordon Setter",
"Great Dane",
"Greyhound",
"Harrier Hound",
"Hungarian Vizsla",
"Hungarian Wire-Haired Vizsla",
"Ibizan Hound",
"Irish Setter",
"Irish Terrier",
"Irish Water Spaniel",
"Irish Wolfhound",
"Italian Greyhound",
"Japanese Akita",
"Japanese Chin",
"Japanese Spitz",
"Keeshond",
"Kerry Blue Terrier",
"King Charles Spaniel",
"Labrador Retriever",
"Lakeland Terrier",
"Leonberger",
"Lhaso Apso",
"Lowchen",
"Maltese",
"Manchester Terrier",
"Maremma Sheepdog",
"Mastiff",
"Newfoundland",
"Norfolk Terrier",
"Norwich Terrier",
"Nova Scotia Duck Tolling Retriever",
"Old English Sheepdog",
"Papillon",
"Parson Jack Russell Terrier",
"Pharaoh Hound",
"Pointer",
"Pomeranian",
"Poodle Miniature",
"Poodle Standard",
"Poodle Toy",
"Portuguese Water Dog",
"Pug",
"Pyrenean Mountain Dog",
"Rhodesian Ridgeback",
"Rottweiler",
"Saluki",
"Samoyed",
"Schipperke",
"Schnauzer Giant",
"Schnauzer Miniature",
"Schnauzer Standard",
"Scottish Terrier",
"Shar Pei",
"Shetland Sheepdog",
"Shih Tzu",
"Siberian Husky",
"Skye Terrier",
"Sloughi",
"Soft Coated Wheaten Terrier",
"St Bernard",
"Sussex Spaniel",
"Swedish Vallhund",
"Tenterfield Terrier",
"Tibetan Mastiff",
"Tibetan Spaniel",
"Tibetan Terrier",
"Weimaraner",
"Welsh Corgi (Cardigan)",
"Welsh Corgi (Pembroke)",
"Welsh Springer Spaniel",
"Welsh Terrier",
"West Highland White Terrier",
"Whippet",
"Yorkshire Terrier",
}
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/dstream/details.go
================================================
package dstream
import (
"errors"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface"
)
// DynamoDetails is a wrapper around the DynamoDBAPI interface,
// it defines behavior for accessing DynamoDB Table metadata
type DynamoDetails struct {
dynamodbiface.DynamoDBAPI
}
// Details is the data needed to index the most recent dataoff to elasticsearch
type Details struct {
HashKey, RangeKey, TableName string
}
// Get Extracts out the attribute Value of Hash Key and Range key from the describe table output
func (d *DynamoDetails) Get(tableName string) (details *Details, err error) {
var out *dynamodb.DescribeTableOutput
req, out := d.DescribeTableRequest(&dynamodb.DescribeTableInput{
TableName: aws.String(tableName),
})
if err = req.Send(); err != nil {
return nil, err
}
// We NEED a hash key to uniquely identify records
hashKey := findAttributeByKeyType(out.Table.KeySchema, "HASH")
if hashKey == "" {
return nil, errors.New("Hash Key not found")
}
// range keys are nice but we don't necessarily need one to uniquely identify a Dynamo Record
var rangeKey string
r := findAttributeByKeyType(out.Table.KeySchema, "RANGE")
rangeKey = r
return &Details{
TableName: tableName,
HashKey: hashKey,
RangeKey: rangeKey,
}, nil
}
func findAttributeByKeyType(schema []*dynamodb.KeySchemaElement, keyType string) string {
var t *string
for _, element := range schema {
t = element.KeyType
if t == &keyType {
return *element.AttributeName
}
}
return ""
}
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/dstream/update.go
================================================
package dstream
import (
"context"
"fmt"
"strings"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
es "github.com/olivere/elastic"
)
// Elasticsearch is an ES Client which will perform Elasticsearch Updates for Dynamo Items
type Elasticsearch struct {
*es.Client
}
// Update takes a reference to adstream.Details object;
// which is used to figure out which Elasticsearch Index to update;
// And an item map[string]events.DynamoDBAttributeValue which will be turned into JSON
// then indexed into Elasticsearch
func (e *Elasticsearch) Update(d *Details, item map[string]events.DynamoDBAttributeValue) (*es.IndexResponse, error) {
tmp := eventStreamToMap(item)
var i interface{}
if err := dynamodbattribute.UnmarshalMap(tmp, &i); err != nil {
return nil, err
}
resp, err := e.Index().
Id(d.docID(item)).
Type(d.docType()).
Index(d.index()).
BodyJson(i).
Do(context.Background())
if err != nil {
return nil, err
}
return resp, nil
}
func (d *Details) docType() string {
if d.RangeKey != "" {
return fmt.Sprintf("%s-%s", d.HashKey, d.RangeKey)
}
return d.HashKey
}
func (d *Details) docID(item map[string]events.DynamoDBAttributeValue) (id string) {
if d != nil {
if d.RangeKey != "" {
id = fmt.Sprintf("%s-%s", item[d.HashKey].String(), item[d.RangeKey].String())
} else {
id = item[d.HashKey].String()
}
}
return id
}
func (d *Details) index() string {
return strings.ToLower(d.TableName)
}
// ugly hack because the types
// events.DynamoDBAttributeValue != *dynamodb.AttributeValue
func eventStreamToMap(attribute interface{}) map[string]*dynamodb.AttributeValue {
// Map to be returned
m := make(map[string]*dynamodb.AttributeValue)
tmp := make(map[string]events.DynamoDBAttributeValue)
switch t := attribute.(type) {
case map[string]events.DynamoDBAttributeValue:
tmp = t
case events.DynamoDBAttributeValue:
tmp = t.Map()
}
for k, v := range tmp {
switch v.DataType() {
case events.DataTypeString:
s := v.String()
m[k] = &dynamodb.AttributeValue{
S: &s,
}
case events.DataTypeBoolean:
b := v.Boolean()
m[k] = &dynamodb.AttributeValue{
BOOL: &b,
}
case events.DataTypeMap:
m[k] = &dynamodb.AttributeValue{
M: eventStreamToMap(v),
}
case events.DataTypeNumber:
n := v.Number()
m[k] = &dynamodb.AttributeValue{
N: &n,
}
case events.DataTypeList:
m[k] = &dynamodb.AttributeValue{
L: eventStreamToList(v),
}
}
}
return m
}
// ugly hack because the types
// events.DynamoDBAttributeValue != *dynamodb.AttributeValue
func eventStreamToList(attribute interface{}) []*dynamodb.AttributeValue {
// List to be returned
l := make([]*dynamodb.AttributeValue, 0)
var tmp []events.DynamoDBAttributeValue
switch t := attribute.(type) {
case []events.DynamoDBAttributeValue:
tmp = t
case events.DynamoDBAttributeValue:
tmp = t.List()
}
for _, v := range tmp {
switch v.DataType() {
case events.DataTypeString:
s := v.String()
l = append(l, &dynamodb.AttributeValue{
S: &s,
})
case events.DataTypeBoolean:
b := v.Boolean()
l = append(l, &dynamodb.AttributeValue{
BOOL: &b,
})
case events.DataTypeMap:
l = append(l, &dynamodb.AttributeValue{
M: eventStreamToMap(v),
})
case events.DataTypeNumber:
n := v.Number()
l = append(l, &dynamodb.AttributeValue{
N: &n,
})
case events.DataTypeList:
l = append(l, &dynamodb.AttributeValue{
L: eventStreamToList(v),
})
}
}
return l
}
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/package.json
================================================
{
"name": "aws-golang-dynamo-stream-to-elasticsearch",
"version": "1.0.0",
"description": "This example deploys a DynamoDB Table, an Elasticsearch Node, and a lambda triggered off of a Dynamo Stream which updates an elasticsearch index with the data from the Dynamo Table",
"main": "",
"keywords": ["Go","serverless","aws","dynamodb","elasticsearch"],
"author": "Brian Jones <brian.jones@beeceej.com>",
"license": "MIT",
"devDependencies": {
"serverless": "^1.30.3"
}
}
================================================
FILE: aws-golang-dynamo-stream-to-elasticsearch/serverless.yml
================================================
service: aws-golang-dynamo-stream-to-elasticsearch
provider:
name: aws
runtime: go1.x
environment:
ELASTICSEARCH_URL:
Fn::GetAtt: ["PuppySearch", "DomainEndpoint"]
iam:
role:
statements:
- Effect: Allow
Action:
- 'dynamodb:ListTables'
- 'dynamodb:DescribeTable'
- 'dynamodb:DescribeStream'
- 'dynamodb:ListStreams'
- 'dynamodb:GetShardIterator'
- 'dynamodb:BatchGetItem'
- 'dynamodb:GetItem'
- 'dynamodb:Query'
- 'dynamodb:Scan'
- 'dynamodb:DescribeReservedCapacity'
- 'dynamodb:DescribeReservedCapacityOfferings'
- 'dynamodb:GetRecords'
Resource:
- { "Fn::GetAtt": ["PuppyDemo", "Arn"] }
- Effect: Allow
Action:
- es:ESHttpPost
- es:ESHttpPut
- es:ESHttpDelete
- es:ESHttpGet
Resource:
- { "Fn::GetAtt": ["PuppySearch", "DomainArn"] }
- { "Fn::Join": ["", ["Fn::GetAtt": ["PuppySearch", "DomainArn"], "/*"]] }
package:
exclude:
- ./**
include:
- ./bin/**
functions:
aws-golang-dynamo-stream-to-elasticsearch:
name: aws-golang-dynamo-stream-to-elasticsearch
handler: bin/aws-golang-dynamo-stream-to-elasticsearch
memorySize: 128
timeout: 60
events:
- stream:
type: dynamodb
batchSize: 100
enabled: true
arn: { "Fn::GetAtt": ["PuppyDemo", "StreamArn"] }
resources:
Resources:
PuppyDemo:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: Retain
Properties:
StreamSpecification:
StreamViewType: NEW_AND_OLD_IMAGES
AttributeDefinitions:
- AttributeName: id
AttributeType: S
- AttributeName: name
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
- AttributeName: name
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
TableName: puppies
PuppySearch:
Type: "AWS::Elasticsearch::Domain"
Properties:
ElasticsearchVersion: "6.3"
DomainName: "puppy-search"
ElasticsearchClusterConfig:
DedicatedMasterEnabled: false
InstanceCount: "1"
ZoneAwarenessEnabled: false
InstanceType: "t2.small.elasticsearch"
EBSOptions:
EBSEnabled: true
Iops: 0
VolumeSize: 10
VolumeType: "gp2"
## Attention! Before you enable this lines, check out the README to avoid an open access policy
# AccessPolicies:
# Version: "2012-10-17"
# Statement:
# -
# Effect: "Allow"
# Principal:
# AWS: "*"
# Action: "es:*"
# Resource: "*"
AdvancedOptions:
rest.action.multi.allow_explicit_index: "true"
================================================
FILE: aws-golang-googlemap/Gopkg.toml
================================================
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
[[constraint]]
name = "github.com/aws/aws-lambda-go"
version = "1.x"
================================================
FILE: aws-golang-googlemap/Makefile
================================================
.PHONY: build clean deploy
build:
dep ensure -v
env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/getgeolocation getgeolocation/main.go
env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/getsearchlocation getsearchlocation/main.go
env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/getnearbylocation getnearbylocation/main.go
env GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o bin/getgeodetail getgeodetail/main.go
clean:
rm -rf ./bin ./vendor Gopkg.lock
deploy: clean build
sls deploy --verbose
================================================
FILE: aws-golang-googlemap/README.md
================================================
<!--
title: .'google map api'
description: 'Serverless example using golang to hit google map api'
framework: v1
platform: AWS
language: Go
priority: 10
authorLink: 'https://github.com/pramonow'
authorName: 'Pramono Winata'
authorAvatar: 'https://avatars0.githubusercontent.com/u/28787057?v=4&s=140'
-->
# Serverless-golang google map api
Serverless example using golang to hit google map api'
when changing any main file call make comment in the folder directory then call serverless deploy -v
change your API KEY in the yml file
There are three endpoint provided:
1. GET Geolocation endpoint with address param (geolocation?address=$address)
2. GET Nearby Location with location and radius param, also name which is optional param (nearbylocation?name=$name&radius=$radius)
3. GET GeoDetail with place id (geodetail?placeid=$placeid)
getgeodetail:
handler: bin/getgeodetail
events:
- http:
path: geodetail
method: get
request:
parameters:
querystrings:
placeid: true
================================================
FILE: aws-golang-googlemap/geomap/geomap.go
================================================
package geomap
import (
"context"
"encoding/json"
"errors"
"io/ioutil"
"net/http"
)
/*
Google Map API package
Containing model and API call for:
- Google geocoding
- Google geolocation detail
- Google get nearby
- Google search location
Each of the api call will need the google map API key
*/
type GooglePlaceDetailResponse struct {
HTMLAttributions []interface{} `json:"html_attributions"`
Result struct {
AddressComponents []AddressComponent `json:"address_components"`
AdrAddress string `json:"adr_address"`
FormattedAddress string `json:"formatted_address"`
FormattedPhoneNumber string `json:"formatted_phone_number"`
Geometry GoogleGeometry `json:"geometry"`
Icon string `json:"icon"`
ID string `json:"id"`
InternationalPhoneNumber string `json:"international_phone_number"`
Name string `json:"name"`
OpeningHours OpeningHour `json:"opening_hours"`
Photos []Photo `json:"photos"`
PlaceID string `json:"place_id"`
PlusCode GooglePlusCode `json:"plus_code"`
PriceLevel int `json:"price_level"`
Rating float64 `json:"rating"`
Reference string `json:"reference"`
Reviews []GooglePlaceReview `json:"reviews"`
Scope string `json:"scope"`
Types []string `json:"types"`
URL string `json:"url"`
UserRatingsTotal int `json:"user_ratings_total"`
UtcOffset int `json:"utc_offset"`
Vicinity string `json:"vicinity"`
Website string `json:"website"`
} `json:"result"`
Status string `json:"status"`
}
type GoogleGeocodeResponse struct {
Results []struct {
AddressComponents []AddressComponent `json:"address_components"`
FormattedAddress string `json:"formatted_address"`
Geometry GoogleGeometry `json:"geometry"`
PlaceID string `json:"place_id"`
PlusCode GooglePlusCode `json:"plus_code"`
Types []string `json:"types"`
} `json:"results"`
Status string `json:"status"`
}
type GooglePlaceSearchResponse struct {
Candidates []Candidate `json:"candidates"`
Status string `json:"status"`
}
type GoogleNearbySearchResponse struct {
HTMLAttributions []interface{} `json:"html_attributions"`
Results []struct {
Geometry GoogleGeometry `json:"geometry"`
Icon string `json:"icon"`
ID string `json:"id"`
Name string `json:"name"`
OpeningHours OpeningHour `json:"opening_hours"`
Photos []Photo `json:"photos"`
PlaceID string `json:"place_id"`
PlusCode GooglePlusCode `json:"plus_code"`
PriceLevel int `json:"price_level,omitempty"`
Rating float64 `json:"rating"`
Reference string `json:"reference"`
Scope string `json:"scope"`
Types []string `json:"types"`
UserRatingsTotal int `json:"user_ratings_total"`
Vicinity string `json:"vicinity"`
} `json:"results"`
Status string `json:"status"`
}
type OpeningHour struct {
OpenNow bool `json:"open_now"`
Periods []struct {
Open struct {
Day int `json:"day"`
Time string `json:"time"`
} `json:"open"`
} `json:"periods,omitempty"`
WeekdayText []string `json:"weekday_text,omitempty"`
}
type GooglePlaceReview struct {
AuthorName string `json:"author_name"`
AuthorURL string `json:"author_url"`
Language string `json:"language"`
ProfilePhotoURL string `json:"profile_photo_url"`
Rating int `json:"rating"`
RelativeTimeDescription string `json:"relative_time_description"`
Text string `json:"text"`
Time int `json:"time"`
}
type Candidate struct {
FormattedAddress string `json:"formatted_address"`
Name string `json:"name"`
Photos []Photo `json:"photos"`
Rating int `json:"rating"`
}
type Photo struct {
Height int `json:"height"`
HTMLAttributions []string `json:"html_attributions"`
PhotoReference string `json:"photo_reference"`
Width int `json:"width"`
}
type GooglePlusCode struct {
CompoundCode string `json:"compound_code"`
GlobalCode string `json:"global_code"`
}
type AddressComponent struct {
LongName string `json:"long_name"`
ShortName string `json:"short_name"`
Types []string `json:"types"`
}
type GoogleGeometry struct {
Location GoogleLocation `json:"location"`
LocationType string `json:"location_type,omitempty"`
Viewport GoogleViewport `json:"viewport"`
}
type GoogleLocation struct {
Lat float64 `json:"lat"`
Lng float64 `json:"lng"`
}
type GoogleViewport struct {
Northeast GoogleLocation `json:"northeast"`
SouthWest GoogleLocation `json:"southwest"`
}
var (
client *http.Client
)
func init() {
client = &http.Client{}
}
/*
GetReverseGeoCode will return GoogleReverseGeocodeResponse on success
the example of usage is sending params that contains "address" and "key" (both of them are required)
more references https://developers.google.com/maps/documentation/geocoding/intro#Geocoding
*/
func GetGeocode(ctx context.Context, params map[string]string) (GoogleGeocodeResponse, error) {
var googleGeocodeResponse GoogleGeocodeResponse
//Generating url for geocode
reqURL := "https://maps.googleapis.com/maps/api/geocode/json"
req, err := http.NewRequest("GET", reqURL, nil)
if err != nil {
return googleGeocodeResponse, err
}
//Insert the query mapping into the request
q := req.URL.Query()
for key, val := range params {
q.Add(key, val)
}
req.URL.RawQuery = q.En
gitextract_k325cu19/ ├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .github/ │ ├── pull_request_template.md │ └── workflows/ │ └── trigger-examples-docs.yml ├── .gitignore ├── .travis.yml ├── LICENSE.txt ├── README.md ├── aws-dotnet-rest-api-with-dynamodb/ │ ├── .gitignore │ ├── DotNetServerless.sln │ ├── README.MD │ ├── src/ │ │ ├── DotNetServerless.Application/ │ │ │ ├── DotNetServerless.Application.csproj │ │ │ ├── Entities/ │ │ │ │ └── Item.cs │ │ │ ├── Handlers/ │ │ │ │ ├── CreateItemHandler.cs │ │ │ │ ├── GetItemHandler.cs │ │ │ │ └── UpdateItemHandler.cs │ │ │ ├── Infrastructure/ │ │ │ │ ├── AWSClientFactory.cs │ │ │ │ ├── Configs/ │ │ │ │ │ ├── AwsBasicConfiguration.cs │ │ │ │ │ └── DynamoDbConfiguration.cs │ │ │ │ └── Repositories/ │ │ │ │ ├── IItemRepository.cs │ │ │ │ └── ItemDynamoRepository.cs │ │ │ ├── Requests/ │ │ │ │ ├── CreateItemRequest.cs │ │ │ │ ├── GetItemRequest.cs │ │ │ │ └── UpdateItemRequest.cs │ │ │ └── Responses/ │ │ │ └── ItemResponse.cs │ │ └── DotNetServerless.Lambda/ │ │ ├── DotNetServerless.Lambda.csproj │ │ ├── Extensions/ │ │ │ └── ServicesExtensions.cs │ │ ├── Functions/ │ │ │ ├── CreateItemFunction.cs │ │ │ ├── GetItemFunction.cs │ │ │ └── UpdateItemFunction.cs │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── package.json │ │ └── serverless.yml │ └── tests/ │ └── DotNetServerless.Tests/ │ ├── DotNetServerless.Tests.csproj │ └── Functions/ │ ├── CreateItemFunctionTests.cs │ ├── GetItemFunctionTests.cs │ └── UpdateItemFunctionTests.cs ├── aws-ffmpeg-layer/ │ ├── .gitignore │ ├── README.md │ ├── build.sh │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-golang-auth-examples/ │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── functions/ │ │ ├── auth/ │ │ │ ├── auth_suite_test.go │ │ │ ├── main.go │ │ │ └── main_test.go │ │ ├── auth2/ │ │ │ ├── auth_suite_test.go │ │ │ ├── main.go │ │ │ └── main_test.go │ │ ├── hello-world/ │ │ │ ├── hello_world_suite_test.go │ │ │ ├── main.go │ │ │ └── main_test.go │ │ └── hello-world2/ │ │ ├── hello_world_suite_test.go │ │ ├── main.go │ │ └── main_test.go │ ├── go.mod │ ├── go.sum │ ├── package.json │ └── serverless.yml ├── aws-golang-dynamo-stream-to-elasticsearch/ │ ├── Gopkg.toml │ ├── Makefile │ ├── README.md │ ├── cmd/ │ │ ├── aws-golang-dynamo-stream-to-elasticsearch/ │ │ │ └── main.go │ │ └── seed-dynamo/ │ │ └── main.go │ ├── dstream/ │ │ ├── details.go │ │ └── update.go │ ├── package.json │ └── serverless.yml ├── aws-golang-googlemap/ │ ├── Gopkg.toml │ ├── Makefile │ ├── README.md │ ├── geomap/ │ │ └── geomap.go │ ├── getgeodetail/ │ │ └── main.go │ ├── getgeolocation/ │ │ └── main.go │ ├── getnearbylocation/ │ │ └── main.go │ ├── getsearchlocation/ │ │ └── main.go │ └── serverless.yml ├── aws-golang-http-get-post/ │ ├── Gopkg.toml │ ├── Makefile │ ├── README.md │ ├── getFolder/ │ │ ├── getExample.go │ │ ├── getQueryExample.go │ │ ├── go.mod │ │ └── go.sum │ ├── package.json │ ├── postFolder/ │ │ ├── go.mod │ │ ├── go.sum │ │ └── postExample.go │ └── serverless.yml ├── aws-golang-rest-api-with-dynamodb/ │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── go.mod │ ├── go.sum │ ├── package.json │ ├── serverless.yml │ └── todos/ │ ├── create.go │ ├── delete.go │ ├── get.go │ ├── list.go │ └── update.go ├── aws-golang-s3-file-replicator/ │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── go.mod │ ├── go.sum │ ├── gomod.sh │ ├── serverless.yml │ └── src/ │ └── main.go ├── aws-golang-simple-http-endpoint/ │ ├── Gopkg.toml │ ├── Makefile │ ├── README.md │ ├── hello/ │ │ └── main.go │ ├── package.json │ ├── serverless.yml │ └── world/ │ └── main.go ├── aws-golang-stream-kinesis-to-elasticsearch/ │ ├── Gopkg.toml │ ├── Makefile │ ├── README.md │ ├── elastic/ │ │ └── elastic.go │ ├── main.go │ ├── package.json │ └── serverless.yml ├── aws-java-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── build.gradle │ ├── gradle/ │ │ └── wrapper/ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── pom.xml │ ├── serverless.yml │ └── src/ │ └── main/ │ ├── java/ │ │ └── com/ │ │ └── serverless/ │ │ ├── ApiGatewayResponse.java │ │ ├── Handler.java │ │ └── Response.java │ └── resources/ │ └── log4j.properties ├── aws-multiple-runtime/ │ ├── README.md │ ├── api/ │ │ ├── .gitignore │ │ └── handler.js │ ├── serverless.yml │ └── web/ │ └── handler.py ├── aws-node/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ └── serverless.yml ├── aws-node-alexa-skill/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-auth0-cognito-custom-authorizers-api/ │ ├── .gitignore │ ├── README.md │ ├── auth.js │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-auth0-custom-authorizers-api/ │ ├── .gitignore │ ├── README.md │ ├── frontend/ │ │ ├── app.css │ │ ├── app.js │ │ └── index.html │ ├── handler.js │ ├── package.json │ ├── public_key-example │ ├── secrets.example.json │ └── serverless.yml ├── aws-node-cdk-extension/ │ ├── README.md │ ├── bin/ │ │ └── example.js │ ├── cdk.json │ ├── lib/ │ │ └── example-stack.js │ ├── package.json │ └── serverless.yml ├── aws-node-dynamic-image-resizer/ │ ├── Dockerfile │ ├── README.md │ ├── config/ │ │ ├── pull-secret.sh │ │ └── push-secret.sh │ ├── deploy.sh │ ├── docker-compose.yml │ ├── package.json │ ├── secrets/ │ │ ├── secrets.env │ │ └── secrets.json │ ├── serverless.yml │ ├── src/ │ │ ├── handlers/ │ │ │ └── resizer/ │ │ │ ├── index.js │ │ │ ├── resizeHandler.js │ │ │ └── s3Handler.js │ │ └── lib/ │ │ └── BaseHandler.js │ └── webpack.config.js ├── aws-node-dynamodb-backup/ │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-env-variables/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-env-variables-encrypted-in-a-file/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ ├── secrets.dev.yml.encrypted │ ├── secrets.prod.yml.encrypted │ └── serverless.yml ├── aws-node-express-api/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-express-dynamodb-api/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-fetch-file-and-store-in-s3/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-fullstack/ │ ├── README.md │ ├── backend/ │ │ ├── .gitignore │ │ ├── index.js │ │ ├── package.json │ │ └── serverless.yml │ └── frontend/ │ ├── .gitignore │ ├── package.json │ ├── public/ │ │ ├── index.html │ │ └── manifest.json │ └── src/ │ ├── DemoApp.css │ ├── DemoApp.js │ ├── index.css │ └── index.js ├── aws-node-function-compiled-with-babel/ │ ├── .gitignore │ ├── README.md │ ├── createResponse.js │ ├── event.json │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-github-check/ │ ├── .babelrc │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── libs/ │ │ ├── github-service.js │ │ └── response-lib.js │ ├── package.json │ ├── serverless.yaml │ └── webpack.config.js ├── aws-node-github-webhook-listener/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-graphql-and-rds/ │ ├── README.md │ ├── handler.js │ ├── package.json │ ├── resolver/ │ │ ├── Common/ │ │ │ ├── aurora.js │ │ │ ├── mysql.js │ │ │ └── postgresql.js │ │ ├── Mutation/ │ │ │ ├── aurora_createUser.js │ │ │ ├── mysql_createUser.js │ │ │ └── postgresql_createUser.js │ │ └── Query/ │ │ ├── aurora_getUser.js │ │ ├── mysql_getUser.js │ │ └── postgresql_getUser.js │ ├── resource/ │ │ ├── AuroraRDSCluster.yml │ │ ├── AuroraRDSClusterParameter.yml │ │ ├── AuroraRDSInstance.yml │ │ ├── AuroraRDSInstanceParameter.yml │ │ ├── LambdaRole.yml │ │ ├── MySqlRDSInstance.yml │ │ ├── PostgreSqlRDSInstance.yml │ │ ├── RoutePublic.yml │ │ ├── RouteTableAssociationSubnetA.yml │ │ ├── RouteTableAssociationSubnetB.yml │ │ ├── RouteTableAssociationSubnetC.yml │ │ ├── RouteTablePublic.yml │ │ ├── ServerlessInternetGateway.yml │ │ ├── ServerlessSecurityGroup.yml │ │ ├── ServerlessSubnetA.yml │ │ ├── ServerlessSubnetB.yml │ │ ├── ServerlessSubnetC.yml │ │ ├── ServerlessSubnetGroup.yml │ │ ├── ServerlessVPC.yml │ │ └── ServerlessVPCGA.yml │ ├── schema.gql │ ├── secrets.json │ └── serverless.yml ├── aws-node-graphql-api-with-dynamodb/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-heroku-postgres/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── index.js │ ├── package.json │ └── serverless.yml ├── aws-node-http-api/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ └── serverless.yml ├── aws-node-http-api-dynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── todos/ │ ├── create.js │ ├── delete.js │ ├── get.js │ ├── list.js │ └── update.js ├── aws-node-http-api-dynamodb-local/ │ ├── .gitignore │ ├── README.md │ ├── dynamodb/ │ │ ├── Dockerfile │ │ └── docker-compose.yml │ ├── offline/ │ │ └── migrations/ │ │ └── todos.json │ ├── package.json │ ├── serverless.yml │ └── todos/ │ ├── create.js │ ├── delete.js │ ├── dynamodb.js │ ├── get.js │ ├── list.js │ └── update.js ├── aws-node-http-api-mongodb/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── model/ │ │ └── User.js │ ├── package.json │ └── serverless.yml ├── aws-node-http-api-typescript/ │ ├── .gitignore │ ├── README.md │ ├── handler.ts │ ├── package.json │ ├── serverless.template.yml │ └── serverless.yml ├── aws-node-http-api-typescript-dynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ ├── todos/ │ │ ├── create.ts │ │ ├── get.ts │ │ ├── list.ts │ │ └── update.ts │ ├── tsconfig.json │ └── tslint.json ├── aws-node-iot-event/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-mongodb-atlas/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── index.js │ ├── package.json │ └── serverless.yml ├── aws-node-oauth-dropbox-api/ │ ├── .gitignore │ ├── README.md │ ├── config/ │ │ ├── default.yml │ │ ├── default_test.yml │ │ ├── stage.yml │ │ └── stage_test.yml │ ├── dropbox/ │ │ └── handler.js │ ├── package.json │ ├── serverless.yml │ └── test/ │ └── test.js ├── aws-node-puppeteer/ │ ├── .gitignore │ ├── README.md │ ├── chrome-script.js │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-recursive-function/ │ ├── .gitignore │ ├── README.md │ ├── event.json │ ├── handler.js │ └── serverless.yml ├── aws-node-rekognition-analysis-s3-image/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── lib/ │ │ └── imageAnalyser.js │ ├── package.json │ ├── post.json │ └── serverless.yml ├── aws-node-rest-api/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── serverless.template.yml │ └── serverless.yml ├── aws-node-rest-api-mongodb/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── model/ │ │ └── User.js │ ├── package.json │ └── serverless.yml ├── aws-node-rest-api-typescript/ │ ├── .editorconfig │ ├── .gitignore │ ├── .nycrc.json │ ├── README.md │ ├── app/ │ │ ├── controller/ │ │ │ └── books.ts │ │ ├── handler.ts │ │ ├── model/ │ │ │ ├── books.ts │ │ │ ├── dto/ │ │ │ │ └── createBookDTO.ts │ │ │ ├── index.ts │ │ │ ├── mongoose-db.ts │ │ │ └── vo/ │ │ │ └── responseVo.ts │ │ ├── service/ │ │ │ └── books.ts │ │ └── utils/ │ │ └── message.ts │ ├── package.json │ ├── serverless.template.yml │ ├── serverless.yml │ ├── tests/ │ │ ├── books.mock.ts │ │ └── books.test.ts │ ├── tsconfig.json │ └── tslint.json ├── aws-node-rest-api-typescript-simple/ │ ├── .gitignore │ ├── README.md │ ├── handler.ts │ ├── package.json │ └── serverless.yml ├── aws-node-rest-api-with-dynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── todos/ │ ├── create.js │ ├── delete.js │ ├── get.js │ ├── list.js │ └── update.js ├── aws-node-rest-api-with-dynamodb-and-offline/ │ ├── .gitignore │ ├── README.md │ ├── dynamodb/ │ │ ├── Dockerfile │ │ └── docker-compose.yml │ ├── offline/ │ │ └── migrations/ │ │ └── todos.json │ ├── package.json │ ├── serverless.yml │ └── todos/ │ ├── create.js │ ├── delete.js │ ├── dynamodb.js │ ├── get.js │ ├── list.js │ └── update.js ├── aws-node-s3-file-replicator/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-scheduled-cron/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ └── serverless.yml ├── aws-node-scheduled-weather/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── lib/ │ │ ├── email.js │ │ └── forecast.js │ ├── package.json │ └── serverless.yml ├── aws-node-serve-dynamic-html-via-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-serverless-gong/ │ ├── README.md │ ├── handler.js │ ├── node │ ├── package.json │ ├── serverless-examples@0.0.0 │ └── serverless.yml ├── aws-node-ses-receive-email-body/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-ses-receive-email-header/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-shared-gateway/ │ ├── README.md │ ├── ci-decomission.sh │ ├── ci-deploy.sh │ ├── gateway/ │ │ ├── .gitignore │ │ └── serverless.yml │ ├── package.json │ ├── products/ │ │ ├── .gitignore │ │ ├── handler.js │ │ └── serverless.yml │ ├── transactions/ │ │ ├── .gitignore │ │ ├── handler.js │ │ └── serverless.yml │ └── users/ │ ├── .gitignore │ ├── handler.js │ └── serverless.yml ├── aws-node-signed-uploads/ │ ├── .babelrc │ ├── .eslintrc │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ ├── src/ │ │ └── upload.js │ └── webpack.config.js ├── aws-node-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-simple-transcribe-s3/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-single-page-app-via-cloudfront/ │ ├── .gitignore │ ├── README.md │ ├── app/ │ │ ├── app.js │ │ └── index.html │ ├── package.json │ ├── serverless-single-page-app-plugin/ │ │ ├── index.js │ │ └── package.json │ └── serverless.yml ├── aws-node-sqs-worker/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ ├── serverless.template.yml │ └── serverless.yml ├── aws-node-stripe-integration/ │ ├── .gitignore │ ├── README.md │ ├── config/ │ │ └── default.yaml │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-telegram-echo-bot/ │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-text-analysis-via-sns-post-processing/ │ ├── .gitignore │ ├── README.md │ ├── addNote.js │ ├── analyzeNote.js │ ├── config.js │ ├── package.json │ └── serverless.yml ├── aws-node-twilio-send-text-message/ │ ├── .gitignore │ ├── .npmignore │ ├── README.md │ ├── event.json │ ├── frontend/ │ │ ├── app.css │ │ └── index.html │ ├── handler.js │ ├── messenger.js │ ├── messenger.test.js │ ├── package.json │ └── serverless.yml ├── aws-node-twitter-joke-bot/ │ ├── README.md │ ├── handler.js │ ├── helpers/ │ │ ├── jokes.js │ │ └── twitter.js │ ├── package.json │ └── serverless.yml ├── aws-node-typescript-apollo-lambda/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ ├── src/ │ │ ├── graphql/ │ │ │ ├── apolloServer.ts │ │ │ ├── resolvers/ │ │ │ │ ├── mutations/ │ │ │ │ │ ├── dummyMutation.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── queries/ │ │ │ │ │ ├── dummyQuery.ts │ │ │ │ │ └── index.ts │ │ │ │ └── typings.ts │ │ │ └── type-defs/ │ │ │ ├── index.ts │ │ │ ├── inputs/ │ │ │ │ └── DummyInput.ts │ │ │ ├── objects/ │ │ │ │ └── DummyObject.ts │ │ │ └── root/ │ │ │ ├── Mutation.ts │ │ │ └── Query.ts │ │ └── handler.ts │ ├── tsconfig.json │ └── tslint.json ├── aws-node-typescript-kinesis/ │ ├── .gitignore │ ├── README.md │ ├── handler.ts │ ├── kinesis/ │ │ ├── consumer.ts │ │ └── producer.ts │ ├── package.json │ ├── serverless.yml │ ├── tsconfig.json │ ├── tslint.json │ └── webpack.config.js ├── aws-node-typescript-nest/ │ ├── .gitignore │ ├── .prettierrc │ ├── README.md │ ├── bench.js │ ├── nest-cli.json │ ├── nodemon-debug.json │ ├── nodemon.json │ ├── package.json │ ├── serverless.yml │ ├── src/ │ │ ├── app.controller.spec.ts │ │ ├── app.controller.ts │ │ ├── app.module.ts │ │ ├── app.service.ts │ │ └── main.ts │ ├── test/ │ │ ├── app.e2e-spec.ts │ │ └── jest-e2e.json │ ├── tsconfig.build.json │ ├── tsconfig.json │ ├── tsconfig.spec.json │ └── tslint.json ├── aws-node-typescript-rest-api-with-dynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ ├── todos/ │ │ ├── create.ts │ │ ├── get.ts │ │ ├── list.ts │ │ └── update.ts │ ├── tsconfig.json │ └── tslint.json ├── aws-node-typescript-sqs-standard/ │ ├── .gitignore │ ├── README.md │ ├── handler.ts │ ├── package.json │ ├── serverless.yml │ ├── sqs/ │ │ ├── receiver.ts │ │ └── sender.ts │ ├── tsconfig.json │ ├── tslint.json │ └── webpack.config.js ├── aws-node-upload-to-s3-and-postprocess/ │ ├── .gitignore │ ├── README.md │ ├── frontend/ │ │ └── index.template.html │ ├── generate-form.js │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-node-vue-nuxt-ssr/ │ ├── .gitignore │ ├── README.md │ ├── binaryMimeTypes.js │ ├── client/ │ │ ├── components/ │ │ │ └── navbar.vue │ │ ├── layouts/ │ │ │ └── default.vue │ │ └── pages/ │ │ ├── dogs/ │ │ │ ├── _breed.vue │ │ │ └── index.vue │ │ └── index.vue │ ├── index.js │ ├── nuxt.config.js │ ├── nuxt.js │ ├── package.json │ ├── secrets.json │ └── serverless.yml ├── aws-node-websockets-authorizers/ │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── aws-python/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ └── serverless.yml ├── aws-python-alexa-skill/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ ├── package.json │ └── serverless.yml ├── aws-python-auth0-custom-authorizers-api/ │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── frontend/ │ │ ├── app.css │ │ ├── app.js │ │ └── index.html │ ├── lambda_handlers.py │ ├── package.json │ ├── public_key-example │ ├── requirements.txt │ ├── secrets.example.json │ └── serverless.yml ├── aws-python-flask-api/ │ ├── README.md │ ├── app.py │ ├── package.json │ ├── requirements.txt │ └── serverless.yml ├── aws-python-flask-dynamodb-api/ │ ├── README.md │ ├── app.py │ ├── package.json │ ├── requirements.txt │ └── serverless.yml ├── aws-python-http-api/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ └── serverless.yml ├── aws-python-http-api-with-dynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── todos/ │ ├── __init__.py │ ├── create.py │ ├── decimalencoder.py │ ├── delete.py │ ├── get.py │ ├── list.py │ └── update.py ├── aws-python-http-api-with-pynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── requirements.txt │ ├── serverless.yml │ └── todos/ │ ├── __init__.py │ ├── create.py │ ├── delete.py │ ├── get.py │ ├── list.py │ ├── todo_model.py │ └── update.py ├── aws-python-line-echo-bot/ │ ├── README.md │ ├── handler.py │ ├── package.json │ ├── requirements.txt │ ├── serverless.yml │ └── setup.cfg ├── aws-python-pynamodb-s3-sigurl/ │ ├── .gitignore │ ├── README.md │ ├── asset/ │ │ ├── __init__.py │ │ ├── asset_model.py │ │ ├── bucket.py │ │ ├── create.py │ │ ├── delete.py │ │ ├── get.py │ │ ├── list.py │ │ └── update.py │ ├── log_cfg.py │ ├── package.json │ ├── requirements.txt │ └── serverless.yml ├── aws-python-rest-api/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ ├── serverless.template.yml │ └── serverless.yml ├── aws-python-rest-api-with-dynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── todos/ │ ├── __init__.py │ ├── create.py │ ├── decimalencoder.py │ ├── delete.py │ ├── get.py │ ├── list.py │ └── update.py ├── aws-python-rest-api-with-faunadb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── requirements.txt │ ├── serverless.yml │ └── todos/ │ ├── __init__.py │ ├── create.py │ ├── delete.py │ ├── get.py │ ├── list.py │ ├── makeresult.py │ ├── schema.py │ └── update.py ├── aws-python-rest-api-with-pymongo/ │ ├── README.md │ ├── item/ │ │ ├── __init__.py │ │ ├── create.py │ │ ├── delete.py │ │ ├── get.py │ │ └── list.py │ ├── package.json │ ├── requirements.txt │ └── serverless.yml ├── aws-python-rest-api-with-pynamodb/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── requirements.txt │ ├── serverless.yml │ └── todos/ │ ├── __init__.py │ ├── create.py │ ├── delete.py │ ├── get.py │ ├── list.py │ ├── todo_model.py │ └── update.py ├── aws-python-scheduled-cron/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ └── serverless.yml ├── aws-python-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ ├── package.json │ └── serverless.yml ├── aws-python-sqs-worker/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ ├── package.json │ ├── serverless.template.yml │ └── serverless.yml ├── aws-python-telegram-bot/ │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── handler.py │ ├── package.json │ ├── requirements.txt │ └── serverless.yml ├── aws-ruby-cron-with-dynamodb/ │ ├── Gemfile │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── src/ │ ├── common/ │ │ ├── adapters/ │ │ │ └── dynamo_db_adapter.rb │ │ └── services/ │ │ └── create_meal_order_service.rb │ └── handlers/ │ └── create_meal_order/ │ └── handler.rb ├── aws-ruby-line-bot/ │ ├── .gitignore │ ├── Gemfile │ ├── README.md │ ├── handler.rb │ ├── package.json │ └── serverless.yml ├── aws-ruby-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── handler.rb │ ├── package.json │ └── serverless.yml ├── aws-ruby-sinatra-dynamodb-api/ │ ├── .gitignore │ ├── .ruby-version │ ├── Gemfile │ ├── README.md │ ├── api.rb │ ├── config.ru │ ├── package.json │ └── serverless.yml ├── aws-ruby-sqs-with-dynamodb/ │ ├── Gemfile │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── src/ │ ├── common/ │ │ ├── adapters/ │ │ │ ├── dynamo_db_adapter.rb │ │ │ └── sqs_adapter.rb │ │ ├── helpers/ │ │ │ └── requests_helper.rb │ │ ├── schemas/ │ │ │ └── lottery_coupon_schema.rb │ │ ├── serializers/ │ │ │ └── error_serializer.rb │ │ ├── services/ │ │ │ ├── create_lottery_coupon_service.rb │ │ │ └── create_sqs_message_service.rb │ │ └── validators/ │ │ └── lottery_coupon_validator.rb │ ├── handlers/ │ │ └── lottery/ │ │ ├── handler.rb │ │ └── worker.rb │ └── package.json ├── aws-ruby-step-functions/ │ ├── Gemfile │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── src/ │ ├── common/ │ │ ├── adapters/ │ │ │ └── dynamo_db_adapter.rb │ │ └── services/ │ │ ├── reserve_parking_service.rb │ │ └── ticket_service.rb │ └── handlers/ │ ├── buy_ticket/ │ │ └── handler.rb │ ├── check_weather/ │ │ └── handler.rb │ ├── release_parking_space/ │ │ └── handler.rb │ ├── reserve_parking_lot_space/ │ │ └── handler.rb │ └── return_ticket/ │ └── handler.rb ├── aws-ruby-step-functions-express/ │ ├── Gemfile │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── src/ │ ├── common/ │ │ ├── adapters/ │ │ │ └── ses_adapter.rb │ │ └── services/ │ │ └── send_email_service.rb │ └── handlers/ │ └── send_email/ │ └── handler.rb ├── aws-ruby-step-functions-with-callback/ │ ├── Gemfile │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── src/ │ ├── common/ │ │ ├── adapters/ │ │ │ └── step_functions_adapter.rb │ │ └── services/ │ │ ├── detection_service.rb │ │ ├── redaction_service.rb │ │ └── send_task_token_service.rb │ └── handlers/ │ ├── check_comment/ │ │ └── handler.rb │ └── redact_comment/ │ └── handler.rb ├── aws-rust-simple-http-endpoint/ │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── test/ │ ├── Cargo.toml │ └── src/ │ └── main.rs ├── azure-node-line-bot/ │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── azure-node-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── azure-node-telegram-bot/ │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── azure-node-typescript-servicebus-trigger-endpoint/ │ ├── .eslintignore │ ├── .eslintrc │ ├── .prettierrc │ ├── README.md │ ├── host.json │ ├── local.settings.json │ ├── package.json │ ├── serverless.yml │ ├── src/ │ │ ├── config/ │ │ │ └── loggerConfig.ts │ │ ├── controller/ │ │ │ ├── messageSenderController.ts │ │ │ └── triggerFunctionController.ts │ │ ├── model/ │ │ │ └── sampleModel.ts │ │ └── service/ │ │ └── serviceBusMessageSender.ts │ ├── tsconfig.json │ └── webpack.config.js ├── check-if-readme-is-up-to-date.sh ├── compose-multiframework/ │ ├── README.md │ ├── cloudformation/ │ │ └── template.yml │ ├── sam/ │ │ ├── handler.js │ │ ├── samconfig.toml │ │ └── template.yml │ ├── serverless-compose.yml │ └── traditional/ │ ├── handler.js │ └── serverless.yml ├── examples.json ├── generate-readme.js ├── google-golang-simple-http-endpoint/ │ ├── .gcloudignore │ ├── README.md │ ├── hello.go │ ├── package.json │ └── serverless.yml ├── google-node-simple-http-endpoint/ │ ├── README.md │ ├── index.js │ ├── package.json │ └── serverless.yml ├── google-node-typescript-http-endpoint/ │ ├── README.md │ ├── package.json │ ├── serverless.yml │ ├── src/ │ │ └── App.ts │ └── tsconfig.json ├── google-python-simple-http-endpoint/ │ ├── README.md │ ├── main.py │ ├── package.json │ ├── requirements.txt │ └── serverless.yml ├── google-ruby-simple-http-endpoint/ │ ├── Gemfile │ ├── README.md │ ├── app.rb │ ├── package.json │ └── serverless.yml ├── kubeless-python-simple-function/ │ ├── README.md │ ├── handler.py │ ├── package.json │ └── serverless.yml ├── kubeless-python-simple-scheduled-function/ │ ├── README.md │ ├── handler.py │ ├── package.json │ └── serverless.yml ├── openwhisk-go-simple/ │ ├── .gitignore │ ├── README.md │ ├── handler.go │ ├── package.json │ └── serverless.yml ├── openwhisk-node-and-docker-chaining-functions/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── openwhisk-node-chaining-functions/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ ├── serverless.yml │ └── utils.js ├── openwhisk-node-scheduled-cron/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── openwhisk-node-simple/ │ ├── .gitignore │ ├── README.md │ ├── delay.js │ ├── hello_world.js │ ├── left_pad.js │ ├── package.json │ └── serverless.yml ├── openwhisk-node-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── handler.js │ ├── package.json │ └── serverless.yml ├── openwhisk-php-simple/ │ ├── .gitignore │ ├── README.md │ ├── handler.php │ ├── package.json │ └── serverless.yml ├── openwhisk-python-scheduled-cron/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ ├── package.json │ └── serverless.yml ├── openwhisk-python-simple/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ ├── package.json │ └── serverless.yml ├── openwhisk-python-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── handler.py │ ├── package.json │ └── serverless.yml ├── openwhisk-ruby-simple/ │ ├── .gitignore │ ├── README.md │ ├── handler.rb │ ├── package.json │ └── serverless.yml ├── openwhisk-rust-simple-http-endpoint/ │ ├── .gitignore │ ├── Cargo.toml │ ├── README.md │ ├── package.json │ ├── serverless.yml │ └── test/ │ ├── Cargo.toml │ └── src/ │ └── main.rs ├── openwhisk-swift-precompiled-binaries/ │ ├── Package.swift │ ├── README.md │ ├── Sources/ │ │ ├── hello/ │ │ │ └── main.swift │ │ └── welcome/ │ │ └── main.swift │ ├── package.json │ └── serverless.yml ├── openwhisk-swift-scheduled-cron/ │ ├── .gitignore │ ├── README.md │ ├── handler.swift │ ├── package.json │ └── serverless.yml ├── openwhisk-swift-simple/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── ping.swift │ └── serverless.yml ├── openwhisk-swift-simple-http-endpoint/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── ping.swift │ └── serverless.yml ├── package.json ├── twilio-node-forward-call/ │ ├── .gitignore │ ├── README.md │ ├── forward-call.js │ ├── package.json │ └── serverless.yml └── validate.js
SYMBOL INDEX (560 symbols across 224 files)
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Entities/Item.cs
class Item (line 5) | public class Item
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/CreateItemHandler.cs
class CreateItemHandler (line 11) | public class CreateItemHandler : IRequestHandler<CreateItemRequest, Item>
method CreateItemHandler (line 15) | public CreateItemHandler(IItemRepository itemRepository)
method Handle (line 20) | public async Task<Item> Handle(CreateItemRequest request, Cancellation...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/GetItemHandler.cs
class GetItemHandler (line 11) | public class GetItemHandler : IRequestHandler<GetItemRequest, Item>
method GetItemHandler (line 15) | public GetItemHandler(IItemRepository itemRepository)
method Handle (line 21) | public async Task<Item> Handle(GetItemRequest request, CancellationTok...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/UpdateItemHandler.cs
class UpdateItemHandler (line 10) | public class UpdateItemHandler : IRequestHandler<UpdateItemRequest, Item>
method UpdateItemHandler (line 14) | public UpdateItemHandler(IItemRepository itemRepository)
method Handle (line 19) | public async Task<Item> Handle(UpdateItemRequest request, Cancellation...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/AWSClientFactory.cs
type IAwsClientFactory (line 7) | public interface IAwsClientFactory<out T>
method GetAwsClient (line 9) | T GetAwsClient();
class AwsClientFactory (line 12) | public class AwsClientFactory<T> : IAwsClientFactory<T> where T : Amazon...
method AwsClientFactory (line 16) | public AwsClientFactory(AwsBasicConfiguration awsBasicConfiguration)
method GetAwsClient (line 21) | public T GetAwsClient()
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Configs/AwsBasicConfiguration.cs
type IAwsBasicConfiguration (line 9) | public interface IAwsBasicConfiguration
method GetAwsCredentials (line 15) | BasicAWSCredentials GetAwsCredentials();
class AwsBasicConfiguration (line 18) | public class AwsBasicConfiguration : IAwsBasicConfiguration
method GetAwsCredentials (line 24) | public BasicAWSCredentials GetAwsCredentials()
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Configs/DynamoDbConfiguration.cs
class DynamoDbConfiguration (line 4) | public class DynamoDbConfiguration
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Repositories/IItemRepository.cs
type IItemRepository (line 8) | public interface IItemRepository
method GetById (line 10) | Task<IEnumerable<T>> GetById<T>(string id, CancellationToken cancellat...
method Save (line 12) | Task Save(Item item, CancellationToken cancellationToken);
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Repositories/ItemDynamoRepository.cs
class ItemDynamoRepository (line 12) | public class ItemDynamoRepository : IItemRepository
method ItemDynamoRepository (line 17) | public ItemDynamoRepository(DynamoDbConfiguration configuration,
method Save (line 28) | public async Task Save(Item item, CancellationToken cancellationToken)
method GetById (line 36) | public async Task<IEnumerable<T>> GetById<T>(string id, CancellationTo...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/CreateItemRequest.cs
class CreateItemRequest (line 6) | public class CreateItemRequest : IRequest<Item>
method Map (line 12) | public Item Map()
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/GetItemRequest.cs
class GetItemRequest (line 7) | public class GetItemRequest : IRequest<Item>
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/UpdateItemRequest.cs
class UpdateItemRequest (line 6) | public class UpdateItemRequest : IRequest<Item>
method Map (line 13) | public Item Map()
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Responses/ItemResponse.cs
class ItemResponse (line 5) | public class ItemResponse
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Extensions/ServicesExtensions.cs
class ServiceCollectionExtensions (line 6) | public static class ServiceCollectionExtensions
method BindAndConfigure (line 8) | public static IServiceCollection BindAndConfigure<TConfig>(this IServi...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/CreateItemFunction.cs
class CreateItemFunction (line 12) | public class CreateItemFunction
method CreateItemFunction (line 16) | public CreateItemFunction() : this(Startup
method CreateItemFunction (line 22) | public CreateItemFunction(IServiceProvider serviceProvider)
method Run (line 27) | [LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializ...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/GetItemFunction.cs
class GetItemFunction (line 12) | public class GetItemFunction
method GetItemFunction (line 16) | public GetItemFunction() : this(Startup
method GetItemFunction (line 22) | public GetItemFunction(IServiceProvider serviceProvider)
method Run (line 27) | [LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializ...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/UpdateItemFunction.cs
class UpdateItemFunction (line 12) | public class UpdateItemFunction
method UpdateItemFunction (line 16) | public UpdateItemFunction() : this(Startup
method UpdateItemFunction (line 22) | public UpdateItemFunction(IServiceProvider serviceProvider)
method Run (line 27) | [LambdaSerializer(typeof(Amazon.Lambda.Serialization.Json.JsonSerializ...
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Program.cs
class Program (line 3) | public class Program
method Main (line 5) | public static void Main(string[] args)
FILE: aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Startup.cs
class Startup (line 12) | public class Startup
method BuildContainer (line 14) | public static IServiceCollection BuildContainer()
method ConfigureServices (line 25) | private static IServiceCollection ConfigureServices(IConfigurationRoot...
FILE: aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/CreateItemFunctionTests.cs
class CreateItemFunctionTests (line 17) | public class CreateItemFunctionTests
method CreateItemFunctionTests (line 19) | public CreateItemFunctionTests()
method run_should_trigger_mediator_handler_and_repository (line 35) | [Fact]
method run_should_return_201_created (line 42) | [Theory]
FILE: aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/GetItemFunctionTests.cs
class GetItemFunctionTests (line 17) | public class GetItemFunctionTests
method GetItemFunctionTests (line 19) | public GetItemFunctionTests()
method run_should_trigger_mediator_handler_and_repository (line 35) | [Fact]
method run_should_return_200_when_find_the_record (line 45) | [Theory]
method run_should_return_404_when_NOT_find_the_record (line 57) | [Theory]
FILE: aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/UpdateItemFunctionTests.cs
class UpdateItemFunctionTests (line 17) | public class UpdateItemFunctionTests
method UpdateItemFunctionTests (line 19) | public UpdateItemFunctionTests()
method run_should_trigger_mediator_handler_and_repository (line 35) | [Fact]
method run_should_return_200_when_updates (line 42) | [Theory]
FILE: aws-ffmpeg-layer/handler.js
constant AWS (line 3) | const AWS = require("aws-sdk");
FILE: aws-golang-auth-examples/functions/auth/auth_suite_test.go
function TestAuth (line 10) | func TestAuth(t *testing.T) {
FILE: aws-golang-auth-examples/functions/auth/main.go
function handler (line 11) | func handler(request events.APIGatewayCustomAuthorizerRequest) (events.A...
function main (line 25) | func main() {
function generatePolicy (line 29) | func generatePolicy(principalID, effect, resource string) events.APIGate...
FILE: aws-golang-auth-examples/functions/auth2/auth_suite_test.go
function TestAuth (line 10) | func TestAuth(t *testing.T) {
FILE: aws-golang-auth-examples/functions/auth2/main.go
function handler (line 11) | func handler(request events.APIGatewayCustomAuthorizerRequest) (events.A...
function main (line 25) | func main() {
function generatePolicy (line 29) | func generatePolicy(principalID, effect, resource string, context map[st...
FILE: aws-golang-auth-examples/functions/hello-world/hello_world_suite_test.go
function TestHelloWorld (line 10) | func TestHelloWorld(t *testing.T) {
FILE: aws-golang-auth-examples/functions/hello-world/main.go
function handler (line 8) | func handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 15) | func main() {
FILE: aws-golang-auth-examples/functions/hello-world2/hello_world_suite_test.go
function TestHelloWorld (line 10) | func TestHelloWorld(t *testing.T) {
FILE: aws-golang-auth-examples/functions/hello-world2/main.go
function handler (line 11) | func handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 28) | func main() {
FILE: aws-golang-dynamo-stream-to-elasticsearch/cmd/aws-golang-dynamo-stream-to-elasticsearch/main.go
function handler (line 23) | func handler(e events.DynamoDBEvent) error {
function main (line 59) | func main() {
FILE: aws-golang-dynamo-stream-to-elasticsearch/cmd/seed-dynamo/main.go
function init (line 15) | func init() {
type puppy (line 19) | type puppy struct
function main (line 32) | func main() {
FILE: aws-golang-dynamo-stream-to-elasticsearch/dstream/details.go
type DynamoDetails (line 13) | type DynamoDetails struct
method Get (line 23) | func (d *DynamoDetails) Get(tableName string) (details *Details, err e...
type Details (line 18) | type Details struct
function findAttributeByKeyType (line 52) | func findAttributeByKeyType(schema []*dynamodb.KeySchemaElement, keyType...
FILE: aws-golang-dynamo-stream-to-elasticsearch/dstream/update.go
type Elasticsearch (line 15) | type Elasticsearch struct
method Update (line 23) | func (e *Elasticsearch) Update(d *Details, item map[string]events.Dyna...
method docType (line 44) | func (d *Details) docType() string {
method docID (line 51) | func (d *Details) docID(item map[string]events.DynamoDBAttributeValue) (...
method index (line 62) | func (d *Details) index() string {
function eventStreamToMap (line 68) | func eventStreamToMap(attribute interface{}) map[string]*dynamodb.Attrib...
function eventStreamToList (line 113) | func eventStreamToList(attribute interface{}) []*dynamodb.AttributeValue {
FILE: aws-golang-googlemap/geomap/geomap.go
type GooglePlaceDetailResponse (line 22) | type GooglePlaceDetailResponse struct
type GoogleGeocodeResponse (line 53) | type GoogleGeocodeResponse struct
type GooglePlaceSearchResponse (line 65) | type GooglePlaceSearchResponse struct
type GoogleNearbySearchResponse (line 70) | type GoogleNearbySearchResponse struct
type OpeningHour (line 92) | type OpeningHour struct
type GooglePlaceReview (line 103) | type GooglePlaceReview struct
type Candidate (line 114) | type Candidate struct
type Photo (line 121) | type Photo struct
type GooglePlusCode (line 128) | type GooglePlusCode struct
type AddressComponent (line 133) | type AddressComponent struct
type GoogleGeometry (line 139) | type GoogleGeometry struct
type GoogleLocation (line 145) | type GoogleLocation struct
type GoogleViewport (line 150) | type GoogleViewport struct
function init (line 159) | func init() {
function GetGeocode (line 169) | func GetGeocode(ctx context.Context, params map[string]string) (GoogleGe...
function FindPlace (line 216) | func FindPlace(ctx context.Context, params map[string]string) (GooglePla...
function PlaceNearby (line 263) | func PlaceNearby(ctx context.Context, params map[string]string) (GoogleN...
function PlaceDetail (line 310) | func PlaceDetail(ctx context.Context, params map[string]string) (GoogleP...
FILE: aws-golang-googlemap/getgeodetail/main.go
type Response (line 17) | type Response
function Handler (line 21) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 48) | func main() {
FILE: aws-golang-googlemap/getgeolocation/main.go
type Response (line 17) | type Response
function Handler (line 21) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 48) | func main() {
FILE: aws-golang-googlemap/getnearbylocation/main.go
type Response (line 17) | type Response
function Handler (line 21) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 60) | func main() {
FILE: aws-golang-googlemap/getsearchlocation/main.go
type Response (line 17) | type Response
function Handler (line 21) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 48) | func main() {
FILE: aws-golang-http-get-post/getFolder/getExample.go
function Handler (line 11) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 23) | func main() {
FILE: aws-golang-http-get-post/getFolder/getQueryExample.go
function Handler (line 11) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 23) | func main() {
FILE: aws-golang-http-get-post/postFolder/postExample.go
type BodyRequest (line 11) | type BodyRequest struct
type BodyResponse (line 16) | type BodyResponse struct
function Handler (line 21) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 49) | func main() {
FILE: aws-golang-rest-api-with-dynamodb/todos/create.go
type Item (line 17) | type Item struct
function Handler (line 23) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 88) | func main() {
FILE: aws-golang-rest-api-with-dynamodb/todos/delete.go
type Item (line 14) | type Item struct
function Handler (line 20) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 53) | func main() {
FILE: aws-golang-rest-api-with-dynamodb/todos/get.go
type Item (line 16) | type Item struct
function Handler (line 22) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 77) | func main() {
FILE: aws-golang-rest-api-with-dynamodb/todos/list.go
type Item (line 16) | type Item struct
function Handler (line 22) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 75) | func main() {
FILE: aws-golang-rest-api-with-dynamodb/todos/update.go
type Item (line 15) | type Item struct
function Handler (line 21) | func Handler(request events.APIGatewayProxyRequest) (events.APIGatewayPr...
function main (line 77) | func main() {
FILE: aws-golang-s3-file-replicator/src/main.go
function Handler (line 17) | func Handler(ctx context.Context, S3Event events.S3Event) {
function main (line 45) | func main() {
FILE: aws-golang-simple-http-endpoint/hello/main.go
type Response (line 16) | type Response
function Handler (line 19) | func Handler(ctx context.Context) (Response, error) {
function main (line 43) | func main() {
FILE: aws-golang-simple-http-endpoint/world/main.go
type Response (line 16) | type Response
function Handler (line 19) | func Handler(ctx context.Context) (Response, error) {
function main (line 43) | func main() {
FILE: aws-golang-stream-kinesis-to-elasticsearch/elastic/elastic.go
type Elastic (line 14) | type Elastic struct
method PushRecords (line 31) | func (e *Elastic) PushRecords(data []events.KinesisEventRecord) error {
function NewClient (line 19) | func NewClient(host, schema string) (*Elastic, error) {
FILE: aws-golang-stream-kinesis-to-elasticsearch/main.go
function handler (line 13) | func handler(ctx context.Context, event events.KinesisEvent) error {
function main (line 22) | func main() {
FILE: aws-java-simple-http-endpoint/src/main/java/com/serverless/ApiGatewayResponse.java
class ApiGatewayResponse (line 13) | public class ApiGatewayResponse {
method ApiGatewayResponse (line 20) | public ApiGatewayResponse(int statusCode, String body, Map<String, Str...
method getStatusCode (line 27) | public int getStatusCode() {
method getBody (line 31) | public String getBody() {
method getHeaders (line 35) | public Map<String, String> getHeaders() {
method isIsBase64Encoded (line 40) | public boolean isIsBase64Encoded() {
method builder (line 44) | public static Builder builder() {
class Builder (line 48) | public static class Builder {
method setStatusCode (line 61) | public Builder setStatusCode(int statusCode) {
method setHeaders (line 66) | public Builder setHeaders(Map<String, String> headers) {
method setRawBody (line 74) | public Builder setRawBody(String rawBody) {
method setObjectBody (line 83) | public Builder setObjectBody(Object objectBody) {
method setBinaryBody (line 93) | public Builder setBinaryBody(byte[] binaryBody) {
method setBase64Encoded (line 107) | public Builder setBase64Encoded(boolean base64Encoded) {
method build (line 112) | public ApiGatewayResponse build() {
FILE: aws-java-simple-http-endpoint/src/main/java/com/serverless/Handler.java
class Handler (line 12) | public class Handler implements RequestHandler<Map<String, Object>, ApiG...
method handleRequest (line 16) | @Override
FILE: aws-java-simple-http-endpoint/src/main/java/com/serverless/Response.java
class Response (line 3) | public class Response {
method Response (line 7) | public Response(String message) {
method getMessage (line 11) | public String getMessage() {
FILE: aws-multiple-runtime/web/handler.py
function hello (line 4) | def hello(event, context):
FILE: aws-node-auth0-custom-authorizers-api/frontend/app.js
constant AUTH0_CLIENT_ID (line 4) | const AUTH0_CLIENT_ID = 'your-auth0-client-id-here';
constant AUTH0_DOMAIN (line 5) | const AUTH0_DOMAIN = 'your-auth0-domain-here.auth0.com';
constant AUTH0_CALLBACK_URL (line 6) | const AUTH0_CALLBACK_URL = window.location.href;
constant PUBLIC_ENDPOINT (line 7) | const PUBLIC_ENDPOINT = 'https://your-aws-endpoint-here.amazonaws.com/de...
constant PRIVATE_ENDPOINT (line 8) | const PRIVATE_ENDPOINT = 'https://your-aws-endpoint-here.us-east-1.amazo...
function updateUI (line 21) | function updateUI() {
FILE: aws-node-auth0-custom-authorizers-api/handler.js
constant AUTH0_CLIENT_ID (line 4) | const AUTH0_CLIENT_ID = process.env.AUTH0_CLIENT_ID;
constant AUTH0_CLIENT_PUBLIC_KEY (line 5) | const AUTH0_CLIENT_PUBLIC_KEY = process.env.AUTH0_CLIENT_PUBLIC_KEY;
FILE: aws-node-cdk-extension/lib/example-stack.js
class ExampleStack (line 4) | class ExampleStack extends Stack {
method constructor (line 11) | constructor (scope, id, props) {
FILE: aws-node-dynamic-image-resizer/src/handlers/resizer/resizeHandler.js
class ResizerHandler (line 6) | class ResizerHandler {
method constructor (line 7) | constructor(){ }
method _process (line 9) | async _process(event) {
method resize (line 14) | async resize(size, path) {
FILE: aws-node-dynamic-image-resizer/src/handlers/resizer/s3Handler.js
class S3Handler (line 7) | class S3Handler {
method constructor (line 8) | constructor() { }
method readStream (line 10) | readStream({ Bucket, Key }) {
method writeStream (line 14) | writeStream({ Bucket, Key }) {
FILE: aws-node-dynamic-image-resizer/src/lib/BaseHandler.js
class BaseHandler (line 1) | class BaseHandler {
method constructor (line 2) | constructor() {
method execute (line 6) | async execute(event, context) {
method _process (line 11) | async _process(event, context) {
FILE: aws-node-express-dynamodb-api/handler.js
constant USERS_TABLE (line 14) | const USERS_TABLE = process.env.USERS_TABLE;
FILE: aws-node-fetch-file-and-store-in-s3/handler.js
constant AWS (line 4) | const AWS = require('aws-sdk');
FILE: aws-node-fullstack/frontend/src/DemoApp.js
constant INITIAL_API_REQUESTS (line 9) | const INITIAL_API_REQUESTS = 50
constant INITIAL_STATUS (line 10) | const INITIAL_STATUS = 'Ready for testing!'
class DemoApp (line 16) | class DemoApp extends Component {
method constructor (line 22) | constructor(props) {
method componentDidMount (line 52) | componentDidMount() {
method toggleAdmin (line 78) | toggleAdmin() {
method setStatus (line 87) | setStatus(status) {
method submitForm (line 100) | submitForm(event) {
method updateApi (line 134) | updateApi(event) {
method generateInvocations (line 170) | generateInvocations(event) {
method generateRandomError (line 220) | generateRandomError(event) {
method render (line 258) | render() {
FILE: aws-node-github-check/handler.js
function githubCheck (line 6) | async function githubCheck(event, context, callback) {
FILE: aws-node-github-check/libs/github-service.js
function isAValidPullRequest (line 1) | function isAValidPullRequest(body) {
function eventIsAPullRequest (line 5) | function eventIsAPullRequest(body) {
function updatePullRequestStatus (line 9) | function updatePullRequestStatus(githubClient, payload, repository, pull...
FILE: aws-node-github-check/libs/response-lib.js
function buildResponse (line 1) | function buildResponse(statusCode, body) {
function buildGithubPayload (line 8) | function buildGithubPayload(state, description) {
function success (line 16) | function success(body) {
function failure (line 20) | function failure(body) {
function githubSuccessPayload (line 24) | function githubSuccessPayload() {
function githubFailurePayload (line 28) | function githubFailurePayload() {
FILE: aws-node-github-webhook-listener/handler.js
function signRequestBody (line 3) | function signRequestBody(key, body) {
FILE: aws-node-graphql-api-with-dynamodb/handler.js
constant AWS (line 9) | const AWS = require('aws-sdk');
FILE: aws-node-http-api-dynamodb-local/todos/dynamodb.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-http-api-dynamodb/todos/create.js
constant AWS (line 4) | const AWS = require('aws-sdk');
FILE: aws-node-http-api-dynamodb/todos/delete.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-http-api-dynamodb/todos/get.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-http-api-dynamodb/todos/list.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-http-api-dynamodb/todos/update.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-http-api-mongodb/handler.js
function dbConnectAndExecute (line 18) | function dbConnectAndExecute(dbUrl, fn) {
FILE: aws-node-http-api-mongodb/model/User.js
method validator (line 9) | validator(name) {
method validator (line 18) | validator(firstname) {
method validator (line 31) | validator(city) {
method validator (line 40) | validator(ip) {
FILE: aws-node-http-api-typescript-dynamodb/todos/update.ts
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-rekognition-analysis-s3-image/lib/imageAnalyser.js
constant AWS (line 3) | const AWS = require('aws-sdk');
class ImageAnalyser (line 7) | class ImageAnalyser {
method getImageLabels (line 9) | static getImageLabels(s3Config) {
FILE: aws-node-rest-api-mongodb/handler.js
function dbConnectAndExecute (line 18) | function dbConnectAndExecute(dbUrl, fn) {
FILE: aws-node-rest-api-mongodb/model/User.js
method validator (line 9) | validator(name) {
method validator (line 18) | validator(firstname) {
method validator (line 31) | validator(city) {
method validator (line 40) | validator(ip) {
FILE: aws-node-rest-api-typescript/app/controller/books.ts
class BooksController (line 7) | class BooksController extends BooksService {
method constructor (line 8) | constructor (books: Model<any>) {
method create (line 16) | async create (event: any, context?: Context) {
method update (line 38) | async update (event: any) {
method find (line 55) | async find () {
method findOne (line 71) | async findOne (event: any, context: Context) {
method deleteOne (line 92) | async deleteOne (event: any) {
FILE: aws-node-rest-api-typescript/app/model/books.ts
type BooksDocument (line 3) | type BooksDocument = mongoose.Document & {
FILE: aws-node-rest-api-typescript/app/model/dto/createBookDTO.ts
class CreateBookDTO (line 1) | class CreateBookDTO {
FILE: aws-node-rest-api-typescript/app/model/vo/responseVo.ts
class ResponseBodyVO (line 1) | class ResponseBodyVO {
class ResponseVO (line 7) | class ResponseVO {
FILE: aws-node-rest-api-typescript/app/service/books.ts
class BooksService (line 4) | class BooksService {
method constructor (line 6) | constructor(books: Model<any>) {
method createBook (line 14) | protected async createBook (params: CreateBookDTO): Promise<object> {
method updateBooks (line 34) | protected updateBooks (id: number, data: object) {
method findBooks (line 45) | protected findBooks () {
method findOneBookById (line 53) | protected findOneBookById (id: number) {
method deleteOneBookById (line 61) | protected deleteOneBookById (id: number) {
FILE: aws-node-rest-api-typescript/app/utils/message.ts
type StatusCode (line 3) | enum StatusCode {
class Result (line 7) | class Result {
method constructor (line 13) | constructor(statusCode: number, code: number, message: string, data?: ...
method bodyToString (line 23) | bodyToString () {
class MessageUtil (line 35) | class MessageUtil {
method success (line 36) | static success(data: object): ResponseVO {
method error (line 42) | static error(code: number = 1000, message: string) {
FILE: aws-node-rest-api-with-dynamodb-and-offline/todos/dynamodb.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-rest-api-with-dynamodb/todos/create.js
constant AWS (line 4) | const AWS = require('aws-sdk');
FILE: aws-node-rest-api-with-dynamodb/todos/delete.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-rest-api-with-dynamodb/todos/get.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-rest-api-with-dynamodb/todos/list.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-rest-api-with-dynamodb/todos/update.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-s3-file-replicator/handler.js
function replicatePromise (line 28) | function replicatePromise(record, destBucket) {
FILE: aws-node-serverless-gong/handler.js
function signRequestBody (line 5) | function signRequestBody(key, body) {
FILE: aws-node-ses-receive-email-body/handler.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-single-page-app-via-cloudfront/app/app.js
function renderApp (line 4) | function renderApp() {
function navigate (line 17) | function navigate(evt) {
FILE: aws-node-single-page-app-via-cloudfront/serverless-single-page-app-plugin/index.js
class ServerlessPlugin (line 5) | class ServerlessPlugin {
method constructor (line 6) | constructor(serverless, options) {
method runAwsCommand (line 39) | runAwsCommand(args) {
method syncDirectory (line 61) | syncDirectory() {
method domainInfo (line 79) | async domainInfo() {
method invalidateCache (line 105) | async invalidateCache() {
FILE: aws-node-text-analysis-via-sns-post-processing/addNote.js
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-twilio-send-text-message/messenger.js
class Messenger (line 3) | class Messenger {
method constructor (line 4) | constructor(client) {
method send (line 8) | send(event) {
FILE: aws-node-typescript-apollo-lambda/src/graphql/apolloServer.ts
constant NODE_ENV (line 6) | const NODE_ENV = process.env.NODE_ENV;
constant IS_DEV (line 8) | const IS_DEV = !NODE_ENV || !['production'].includes(NODE_ENV);
FILE: aws-node-typescript-apollo-lambda/src/graphql/resolvers/mutations/dummyMutation.ts
function dummyMutation (line 3) | async function dummyMutation(
FILE: aws-node-typescript-apollo-lambda/src/graphql/resolvers/queries/dummyQuery.ts
function dummyQuery (line 3) | async function dummyQuery(
FILE: aws-node-typescript-apollo-lambda/src/graphql/resolvers/typings.ts
type IDummyObject (line 1) | interface IDummyObject {
type IDummyQueryArgs (line 6) | interface IDummyQueryArgs {
type IDummyMutationArgs (line 10) | interface IDummyMutationArgs {
FILE: aws-node-typescript-nest/src/app.controller.ts
class AppController (line 5) | class AppController {
method constructor (line 6) | constructor(private readonly appService: AppService) {}
method getHello (line 9) | getHello(): string {
FILE: aws-node-typescript-nest/src/app.module.ts
class AppModule (line 10) | class AppModule {}
FILE: aws-node-typescript-nest/src/app.service.ts
class AppService (line 4) | class AppService {
method getHello (line 5) | getHello(): string {
FILE: aws-node-typescript-nest/src/main.ts
function bootstrapServer (line 25) | async function bootstrapServer(): Promise<Server> {
FILE: aws-node-typescript-rest-api-with-dynamodb/todos/update.ts
constant AWS (line 3) | const AWS = require('aws-sdk');
FILE: aws-node-upload-to-s3-and-postprocess/generate-form.js
function getSignatureKey (line 8) | function getSignatureKey(key, dateStamp, regionName, serviceName) {
FILE: aws-node-websockets-authorizers/handler.js
constant AWS (line 3) | const AWS = require('aws-sdk')
FILE: aws-python-alexa-skill/handler.py
function parseInt (line 4) | def parseInt(value):
function lucky_number (line 11) | def lucky_number(event, context):
FILE: aws-python-auth0-custom-authorizers-api/frontend/app.js
constant AUTH0_CLIENT_ID (line 4) | const AUTH0_CLIENT_ID = 'your-auth0-client-id-here';
constant AUTH0_DOMAIN (line 5) | const AUTH0_DOMAIN = 'your-auth0-domain-here.auth0.com';
constant AUTH0_CALLBACK_URL (line 6) | const AUTH0_CALLBACK_URL = window.location.href;
constant PUBLIC_ENDPOINT (line 7) | const PUBLIC_ENDPOINT = 'https://your-aws-endpoint-here.amazonaws.com/de...
constant PRIVATE_ENDPOINT (line 8) | const PRIVATE_ENDPOINT = 'https://your-aws-endpoint-here.us-east-1.amazo...
function updateUI (line 21) | function updateUI() {
FILE: aws-python-auth0-custom-authorizers-api/lambda_handlers.py
function auth (line 14) | def auth(event, context):
function public_endpoint (line 39) | def public_endpoint(event, context):
function private_endpoint (line 43) | def private_endpoint(event, context):
function jwt_verify (line 47) | def jwt_verify(auth_token, public_key):
function generate_policy (line 54) | def generate_policy(principal_id, effect, resource):
function convert_certificate_to_pem (line 71) | def convert_certificate_to_pem(public_key):
function format_public_key (line 78) | def format_public_key(public_key):
function create_200_response (line 85) | def create_200_response(message):
function create_aws_lambda_response (line 95) | def create_aws_lambda_response(status_code, message, headers):
FILE: aws-python-flask-api/app.py
function hello_from_root (line 7) | def hello_from_root():
function hello (line 12) | def hello():
function resource_not_found (line 17) | def resource_not_found(e):
FILE: aws-python-flask-dynamodb-api/app.py
function get_user (line 21) | def get_user(user_id):
function create_user (line 35) | def create_user():
function resource_not_found (line 49) | def resource_not_found(e):
FILE: aws-python-http-api-with-dynamodb/todos/create.py
function create (line 11) | def create(event, context):
FILE: aws-python-http-api-with-dynamodb/todos/decimalencoder.py
class DecimalEncoder (line 6) | class DecimalEncoder(json.JSONEncoder):
method default (line 7) | def default(self, obj):
FILE: aws-python-http-api-with-dynamodb/todos/delete.py
function delete (line 7) | def delete(event, context):
FILE: aws-python-http-api-with-dynamodb/todos/get.py
function get (line 9) | def get(event, context):
FILE: aws-python-http-api-with-dynamodb/todos/list.py
function list (line 9) | def list(event, context):
FILE: aws-python-http-api-with-dynamodb/todos/update.py
function update (line 11) | def update(event, context):
FILE: aws-python-http-api-with-pynamodb/todos/create.py
function create (line 8) | def create(event, context):
FILE: aws-python-http-api-with-pynamodb/todos/delete.py
function delete (line 7) | def delete(event, context):
FILE: aws-python-http-api-with-pynamodb/todos/get.py
function get (line 7) | def get(event, context):
FILE: aws-python-http-api-with-pynamodb/todos/list.py
function todo_list (line 6) | def todo_list(event, context):
FILE: aws-python-http-api-with-pynamodb/todos/todo_model.py
class TodoModel (line 8) | class TodoModel(Model):
class Meta (line 9) | class Meta:
method save (line 23) | def save(self, conditional_operator=None, **expected_values):
method __iter__ (line 27) | def __iter__(self):
FILE: aws-python-http-api-with-pynamodb/todos/update.py
function update (line 8) | def update(event, context):
FILE: aws-python-http-api/handler.py
function hello (line 4) | def hello(event, context):
FILE: aws-python-line-echo-bot/handler.py
function webhook (line 10) | def webhook(event, context):
FILE: aws-python-pynamodb-s3-sigurl/asset/asset_model.py
class State (line 13) | class State(Enum):
class AssetModel (line 24) | class AssetModel(Model):
class Meta (line 25) | class Meta:
method __str__ (line 39) | def __str__(self):
method get_key (line 42) | def get_key(self):
method save (line 45) | def save(self, conditional_operator=None, **expected_values):
method __iter__ (line 54) | def __iter__(self):
method get_upload_url (line 58) | def get_upload_url(self, ttl=60):
method get_download_url (line 76) | def get_download_url(self, ttl=60):
method mark_received (line 100) | def mark_received(self):
method mark_uploaded (line 108) | def mark_uploaded(self):
method mark_deleted (line 119) | def mark_deleted(self):
FILE: aws-python-pynamodb-s3-sigurl/asset/bucket.py
function event (line 8) | def event(event, context):
FILE: aws-python-pynamodb-s3-sigurl/asset/create.py
function create (line 7) | def create(event, context):
FILE: aws-python-pynamodb-s3-sigurl/asset/delete.py
function delete (line 7) | def delete(event, context):
FILE: aws-python-pynamodb-s3-sigurl/asset/get.py
function get (line 8) | def get(event, context):
FILE: aws-python-pynamodb-s3-sigurl/asset/list.py
function asset_list (line 6) | def asset_list(event, context):
FILE: aws-python-pynamodb-s3-sigurl/asset/update.py
function update (line 8) | def update(event, context):
FILE: aws-python-rest-api-with-dynamodb/todos/create.py
function create (line 11) | def create(event, context):
FILE: aws-python-rest-api-with-dynamodb/todos/decimalencoder.py
class DecimalEncoder (line 6) | class DecimalEncoder(json.JSONEncoder):
method default (line 7) | def default(self, obj):
FILE: aws-python-rest-api-with-dynamodb/todos/delete.py
function delete (line 7) | def delete(event, context):
FILE: aws-python-rest-api-with-dynamodb/todos/get.py
function get (line 9) | def get(event, context):
FILE: aws-python-rest-api-with-dynamodb/todos/list.py
function list (line 9) | def list(event, context):
FILE: aws-python-rest-api-with-dynamodb/todos/update.py
function update (line 11) | def update(event, context):
FILE: aws-python-rest-api-with-faunadb/todos/create.py
function create (line 9) | def create(event, context):
FILE: aws-python-rest-api-with-faunadb/todos/delete.py
function delete (line 6) | def delete(event, context):
FILE: aws-python-rest-api-with-faunadb/todos/get.py
function get (line 9) | def get(event, context):
FILE: aws-python-rest-api-with-faunadb/todos/list.py
function list (line 8) | def list(event, context):
FILE: aws-python-rest-api-with-faunadb/todos/makeresult.py
function _to_epoch (line 3) | def _to_epoch(fauna_time):
function make_result (line 6) | def make_result(value):
FILE: aws-python-rest-api-with-faunadb/todos/schema.py
function schema (line 5) | def schema(event, context):
FILE: aws-python-rest-api-with-faunadb/todos/update.py
function update (line 10) | def update(event, context):
FILE: aws-python-rest-api-with-pymongo/item/create.py
function create (line 19) | def create(event, context):
FILE: aws-python-rest-api-with-pymongo/item/delete.py
function delete (line 17) | def delete(event, context):
FILE: aws-python-rest-api-with-pymongo/item/get.py
function get (line 18) | def get(event, context):
FILE: aws-python-rest-api-with-pymongo/item/list.py
function list (line 18) | def list(event, context):
FILE: aws-python-rest-api-with-pynamodb/todos/create.py
function create (line 8) | def create(event, context):
FILE: aws-python-rest-api-with-pynamodb/todos/delete.py
function delete (line 7) | def delete(event, context):
FILE: aws-python-rest-api-with-pynamodb/todos/get.py
function get (line 7) | def get(event, context):
FILE: aws-python-rest-api-with-pynamodb/todos/list.py
function todo_list (line 6) | def todo_list(event, context):
FILE: aws-python-rest-api-with-pynamodb/todos/todo_model.py
class TodoModel (line 8) | class TodoModel(Model):
class Meta (line 9) | class Meta:
method save (line 23) | def save(self, conditional_operator=None, **expected_values):
method __iter__ (line 27) | def __iter__(self):
FILE: aws-python-rest-api-with-pynamodb/todos/update.py
function update (line 8) | def update(event, context):
FILE: aws-python-rest-api/handler.py
function hello (line 4) | def hello(event, context):
FILE: aws-python-scheduled-cron/handler.py
function run (line 8) | def run(event, context):
FILE: aws-python-simple-http-endpoint/handler.py
function endpoint (line 5) | def endpoint(event, context):
FILE: aws-python-sqs-worker/handler.py
function producer (line 14) | def producer(event, context):
function consumer (line 39) | def consumer(event, context):
FILE: aws-python-telegram-bot/handler.py
function configure_telegram (line 25) | def configure_telegram():
function webhook (line 40) | def webhook(event, context):
function set_webhook (line 67) | def set_webhook(event, context):
FILE: aws-python/handler.py
function hello (line 4) | def hello(event, context):
FILE: aws-ruby-cron-with-dynamodb/src/common/adapters/dynamo_db_adapter.rb
class DynamoDBAdapter (line 6) | class DynamoDBAdapter
method initialize (line 8) | def initialize
method save_item (line 12) | def save_item(item)
method logger (line 21) | def logger
method table_item (line 25) | def table_item(item)
FILE: aws-ruby-cron-with-dynamodb/src/common/services/create_meal_order_service.rb
class CreateMealOrderService (line 9) | class CreateMealOrderService
method call (line 13) | def call
method save (line 18) | def save(order)
method build_order (line 24) | def build_order
FILE: aws-ruby-cron-with-dynamodb/src/handlers/create_meal_order/handler.rb
function run (line 5) | def run(event:, context:)
FILE: aws-ruby-line-bot/handler.rb
function webhook (line 3) | def webhook(event:, context:)
FILE: aws-ruby-simple-http-endpoint/handler.rb
function endpoint (line 1) | def endpoint(event:, context:)
FILE: aws-ruby-sqs-with-dynamodb/src/common/adapters/dynamo_db_adapter.rb
class DynamoDBAdapter (line 6) | class DynamoDBAdapter
method initialize (line 8) | def initialize
method save_item (line 12) | def save_item(item)
method logger (line 21) | def logger
method table_item (line 25) | def table_item(item)
FILE: aws-ruby-sqs-with-dynamodb/src/common/adapters/sqs_adapter.rb
class SqsAdapter (line 6) | class SqsAdapter
method initialize (line 8) | def initialize
method send_message (line 12) | def send_message(message)
method logger (line 26) | def logger
FILE: aws-ruby-sqs-with-dynamodb/src/common/helpers/requests_helper.rb
class Requests (line 3) | class Requests
method initialize (line 4) | def initialize(body)
method call (line 8) | def call
method transform_body (line 14) | def transform_body(body)
FILE: aws-ruby-sqs-with-dynamodb/src/common/serializers/error_serializer.rb
type ErrorSerializer (line 3) | module ErrorSerializer
function serialize (line 4) | def self.serialize(exception)
function dry_errors (line 8) | def self.dry_errors(exception)
function handle_unprocessable_exception (line 18) | def self.handle_unprocessable_exception(exception)
FILE: aws-ruby-sqs-with-dynamodb/src/common/services/create_lottery_coupon_service.rb
class CreateLotteryCouponService (line 8) | class CreateLotteryCouponService
method initialize (line 12) | def initialize(attributes)
method call (line 16) | def call
method save (line 21) | def save(coupon)
method build_coupon (line 29) | def build_coupon
FILE: aws-ruby-sqs-with-dynamodb/src/common/services/create_sqs_message_service.rb
class CreateSqsMessageService (line 5) | class CreateSqsMessageService
method initialize (line 7) | def initialize(params)
method call (line 11) | def call
method send_message (line 20) | def send_message(message)
method sqs_message (line 24) | def sqs_message(params)
FILE: aws-ruby-sqs-with-dynamodb/src/common/validators/lottery_coupon_validator.rb
class LotteryCouponValidator (line 5) | class LotteryCouponValidator
method initialize (line 9) | def initialize(coupon)
method failure? (line 14) | def failure?
method errors (line 18) | def errors
FILE: aws-ruby-sqs-with-dynamodb/src/handlers/lottery/handler.rb
function run (line 10) | def run(event:, context:)
function unprocessable_entity (line 18) | def unprocessable_entity(errors)
function create_sqs_message (line 24) | def create_sqs_message(body)
function serialize_errors (line 31) | def serialize_errors(errors)
function transform_event_body (line 35) | def transform_event_body(body)
FILE: aws-ruby-sqs-with-dynamodb/src/handlers/lottery/worker.rb
function run (line 6) | def run(event:, context:)
function transform_event_body (line 11) | def transform_event_body(body)
FILE: aws-ruby-step-functions-express/src/common/adapters/ses_adapter.rb
class SesAdapter (line 6) | class SesAdapter
method initialize (line 8) | def initialize
method send_email (line 12) | def send_email
method mail_data (line 23) | def mail_data
method logger (line 62) | def logger
FILE: aws-ruby-step-functions-express/src/common/services/send_email_service.rb
class SendEmailService (line 5) | class SendEmailService
method call (line 7) | def call
method send (line 13) | def send
FILE: aws-ruby-step-functions-express/src/handlers/send_email/handler.rb
function run (line 5) | def run(event:, context:)
FILE: aws-ruby-step-functions-with-callback/src/common/adapters/step_functions_adapter.rb
class StepFunctionsAdapter (line 6) | class StepFunctionsAdapter
method initialize (line 10) | def initialize(task_token:, output:)
method send_task_success (line 16) | def send_task_success
method send_task_failure (line 21) | def send_task_failure
method success_task_token_data (line 28) | def success_task_token_data(task_token:, output:)
method failure_task_token_data (line 35) | def failure_task_token_data(task_token:, output:)
method logger (line 42) | def logger
FILE: aws-ruby-step-functions-with-callback/src/common/services/detection_service.rb
class DetectionService (line 5) | class DetectionService
method initialize (line 9) | def initialize(comment)
method call (line 15) | def call
method build_result (line 24) | def build_result(entities)
method detect_pii_entities (line 32) | def detect_pii_entities(content_to_be_analyzed)
method pii_detected? (line 36) | def pii_detected?(result)
FILE: aws-ruby-step-functions-with-callback/src/common/services/redaction_service.rb
class RedactionService (line 3) | class RedactionService
method initialize (line 7) | def initialize(comment_to_redact, detection_result)
method call (line 12) | def call
method redact_note (line 20) | def redact_note(entities, comment_to_redact)
method entity_offset_difference (line 28) | def entity_offset_difference(entity)
FILE: aws-ruby-step-functions-with-callback/src/common/services/send_task_token_service.rb
class SendTaskTokenService (line 5) | class SendTaskTokenService
method initialize (line 7) | def initialize(task_token, status, output)
method call (line 13) | def call
method send_task (line 21) | def send_task
method status_success? (line 30) | def status_success?
FILE: aws-ruby-step-functions-with-callback/src/handlers/check_comment/handler.rb
function run (line 6) | def run(event:, context:)
function send_task_token (line 13) | def send_task_token(task_token, status, response)
function check_content_comment (line 17) | def check_content_comment(comment, task_token)
FILE: aws-ruby-step-functions-with-callback/src/handlers/redact_comment/handler.rb
function run (line 5) | def run(event:, context:)
function redact_comment (line 11) | def redact_comment(comment, detection_result)
FILE: aws-ruby-step-functions/src/common/adapters/dynamo_db_adapter.rb
class DynamoDBAdapter (line 6) | class DynamoDBAdapter
method initialize (line 8) | def initialize
method save_item (line 12) | def save_item(item)
method update_item (line 19) | def update_item(item_id)
method logger (line 28) | def logger
method table_item (line 32) | def table_item(item)
method update_item_params (line 39) | def update_item_params(item_id)
FILE: aws-ruby-step-functions/src/common/services/reserve_parking_service.rb
class ReserveParkingService (line 8) | class ReserveParkingService
method initialize (line 12) | def initialize(attributes)
method reserve_parking (line 16) | def reserve_parking
method release_parking (line 22) | def release_parking
method default_status (line 32) | def default_status
method build_reserveration (line 36) | def build_reserveration
FILE: aws-ruby-step-functions/src/common/services/ticket_service.rb
class TicketService (line 8) | class TicketService
method initialize (line 12) | def initialize(attributes)
method create_ticket (line 16) | def create_ticket
method cancel_ticket (line 22) | def cancel_ticket
method default_status (line 32) | def default_status
method build_ticket (line 36) | def build_ticket
FILE: aws-ruby-step-functions/src/handlers/buy_ticket/handler.rb
function run (line 7) | def run(event:, context:)
function create_ticket (line 11) | def create_ticket(body)
FILE: aws-ruby-step-functions/src/handlers/check_weather/handler.rb
function run (line 7) | def run(event:, context:)
FILE: aws-ruby-step-functions/src/handlers/release_parking_space/handler.rb
function run (line 7) | def run(event:, context:)
function release_parking (line 11) | def release_parking(parking_reservation)
function parking_reservation (line 18) | def parking_reservation(event)
FILE: aws-ruby-step-functions/src/handlers/reserve_parking_lot_space/handler.rb
function run (line 7) | def run(event:, context:)
function reserve_parking (line 11) | def reserve_parking(body)
FILE: aws-ruby-step-functions/src/handlers/return_ticket/handler.rb
function run (line 7) | def run(event:, context:)
function cancel_ticket (line 11) | def cancel_ticket(ticket_id)
function ticket_id (line 18) | def ticket_id(event)
FILE: aws-rust-simple-http-endpoint/test/src/main.rs
type Error (line 5) | type Error = Box<dyn std::error::Error + Sync + Send + 'static>;
function main (line 8) | async fn main() -> Result<(), Error> {
function test (line 14) | async fn test(_: Request, _: Context) -> Result<impl IntoResponse, Error> {
FILE: azure-node-line-bot/handler.js
function handleEvent (line 15) | function handleEvent(event) {
FILE: azure-node-typescript-servicebus-trigger-endpoint/src/model/sampleModel.ts
class SampleModel (line 1) | class SampleModel {
FILE: azure-node-typescript-servicebus-trigger-endpoint/src/service/serviceBusMessageSender.ts
class ServiceBusMessageSender (line 11) | class ServiceBusMessageSender {
method send (line 12) | public async send(message: SampleModel): Promise<void> {
FILE: generate-readme.js
method SERVERLESS_EXAMPLE_TABLE (line 60) | SERVERLESS_EXAMPLE_TABLE() {
FILE: google-golang-simple-http-endpoint/hello.go
function Hello (line 10) | func Hello(w http.ResponseWriter, r *http.Request) {
FILE: google-python-simple-http-endpoint/main.py
function endpoint (line 8) | def endpoint(request):
FILE: kubeless-python-simple-function/handler.py
function hello (line 1) | def hello(event, context):
FILE: kubeless-python-simple-scheduled-function/handler.py
function printClock (line 2) | def printClock(event, context):
FILE: openwhisk-go-simple/handler.go
function main (line 7) | func main() {
FILE: openwhisk-node-and-docker-chaining-functions/handler.js
function http (line 7) | function http(url, qs) {
function locationFromAddress (line 28) | function locationFromAddress(params) {
function sunriseSunset (line 34) | function sunriseSunset(params) {
FILE: openwhisk-node-chaining-functions/handler.js
function chain (line 3) | function chain(parameters) {
FILE: openwhisk-node-chaining-functions/utils.js
function split (line 3) | function split(params) {
function join (line 7) | function join(params) {
function reverse (line 11) | function reverse(params) {
FILE: openwhisk-node-scheduled-cron/handler.js
function cron (line 3) | function cron() {
FILE: openwhisk-node-simple-http-endpoint/handler.js
function time (line 5) | function time(params) {
FILE: openwhisk-node-simple/delay.js
function delay (line 1) | function delay() {
FILE: openwhisk-node-simple/hello_world.js
function main (line 3) | function main(params) {
FILE: openwhisk-node-simple/left_pad.js
function padlines (line 3) | function padlines(args) {
FILE: openwhisk-php-simple/handler.php
function greeting (line 2) | function greeting(array $args) : array
FILE: openwhisk-python-scheduled-cron/handler.py
function run (line 4) | def run(params):
FILE: openwhisk-python-simple-http-endpoint/handler.py
function endpoint (line 4) | def endpoint(params):
FILE: openwhisk-python-simple/handler.py
function endpoint (line 1) | def endpoint(params):
FILE: openwhisk-ruby-simple/handler.rb
function main (line 1) | def main(args)
FILE: openwhisk-rust-simple-http-endpoint/test/src/main.rs
function main (line 4) | fn main() {
FILE: validate.js
function hasSameProps (line 8) | function hasSameProps(obj1, obj2) {
function isEmptyObject (line 12) | function isEmptyObject(obj) {
Condensed preview — 1049 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,472K chars).
[
{
"path": ".editorconfig",
"chars": 330,
"preview": "# EditorConfig helps developers define and maintain consistent\n# coding styles between different editors and IDEs\n# edit"
},
{
"path": ".eslintignore",
"chars": 13,
"preview": "node_modules\n"
},
{
"path": ".eslintrc.json",
"chars": 178,
"preview": "{\n \"root\": true,\n \"extends\": \"airbnb-base\",\n \"env\": {\n \"node\": true\n },\n \"rules\": {\n \"strict\": \"off\",\n \"no"
},
{
"path": ".github/pull_request_template.md",
"chars": 186,
"preview": "<!-- Hi there ⊂◉‿◉つ\n\nThanks for submitting a PR! We're excited to see what you've got for us!\n\nMake sure to lint your co"
},
{
"path": ".github/workflows/trigger-examples-docs.yml",
"chars": 1101,
"preview": "name: Trigger Sync Examples\n\non:\n push:\n branches:\n - v4\n paths:\n - \"examples.json\"\n workflow_dispatch"
},
{
"path": ".gitignore",
"chars": 251,
"preview": ".serverless\n*.log\nnpm-debug.log\npids\n*.pid\n*.seed\ndist\nlib-cov\ncoverage\n.grunt\n.lock-wscript\nnode_modules\n.idea\n.DS_Stor"
},
{
"path": ".travis.yml",
"chars": 157,
"preview": "language: node_js\nsudo: false\nnode_js:\n - 6\n\ninstall:\n - npm install\n\nscript:\n - npm run docs\n - npm run validate\n "
},
{
"path": "LICENSE.txt",
"chars": 1439,
"preview": "The MIT License (MIT)\n\nCopyright (c) 2017 Serverless, Inc. http://www.serverless.com\n\nThe following license applies to a"
},
{
"path": "README.md",
"chars": 102201,
"preview": "<br/>\n\n<div align=\"center\">\n <a aria-label=\"Serverless.com\" href=\"https://serverless.com\">Website</a>\n • \n "
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/.gitignore",
"chars": 371,
"preview": "git node_modules\n.serverless\n*.swp\n*.*~\nproject.lock.json\n.DS_Store\n*.pyc\nnupkg/\n\n# Visual Studio Code\n.vscode\n\n# User-s"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/DotNetServerless.sln",
"chars": 4597,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.26124.0\nMini"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/README.MD",
"chars": 803,
"preview": "<!--\ntitle: 'Dot Net REST API with DynamoDB'\ndescription: 'Setup a REST API w/ DynamoDB using Dot Net Core 2.1'\nframewor"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/DotNetServerless.Application.csproj",
"chars": 694,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netstandard2.0</TargetFramework>\n </PropertyG"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Entities/Item.cs",
"chars": 363,
"preview": "using Amazon.DynamoDBv2.DataModel;\n\nnamespace DotNetServerless.Application.Entities\n{\n public class Item\n {\n [Dynam"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/CreateItemHandler.cs",
"chars": 809,
"preview": "using System;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing DotNetServerless.Application.Entities;\nusing D"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/GetItemHandler.cs",
"chars": 784,
"preview": "using System.Linq;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing DotNetServerless.Application.Entities;\nus"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Handlers/UpdateItemHandler.cs",
"chars": 750,
"preview": "using System.Threading;\nusing System.Threading.Tasks;\nusing DotNetServerless.Application.Entities;\nusing DotNetServerles"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/AWSClientFactory.cs",
"chars": 914,
"preview": "using System;\nusing Amazon.Runtime;\nusing DotNetServerless.Application.Infrastructure.Configs;\n\nnamespace DotNetServerle"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Configs/AwsBasicConfiguration.cs",
"chars": 1033,
"preview": "using System;\nusing System.Linq;\nusing Amazon;\nusing Amazon.Runtime;\nusing Newtonsoft.Json;\n\nnamespace DotNetServerless."
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Configs/DynamoDbConfiguration.cs",
"chars": 154,
"preview": "namespace DotNetServerless.Application.Infrastructure.Configs\n{\n\n public class DynamoDbConfiguration\n {\n public str"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Repositories/IItemRepository.cs",
"chars": 397,
"preview": "using System.Collections.Generic;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing DotNetServerless.Applicati"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Infrastructure/Repositories/ItemDynamoRepository.cs",
"chars": 1701,
"preview": "using System.Collections.Generic;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Amazon.DynamoDBv2;\nusing A"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/CreateItemRequest.cs",
"chars": 452,
"preview": "using DotNetServerless.Application.Entities;\nusing MediatR;\n\nnamespace DotNetServerless.Application.Requests\n{\n public "
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/GetItemRequest.cs",
"chars": 215,
"preview": "using System;\nusing DotNetServerless.Application.Entities;\nusing MediatR;\n\nnamespace DotNetServerless.Application.Reques"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Requests/UpdateItemRequest.cs",
"chars": 504,
"preview": "using DotNetServerless.Application.Entities;\nusing MediatR;\n\nnamespace DotNetServerless.Application.Requests\n{\n public "
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Application/Responses/ItemResponse.cs",
"chars": 258,
"preview": "using System;\n\nnamespace DotNetServerless.Application.Responses\n{\n public class ItemResponse\n {\n public Guid Id { g"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/DotNetServerless.Lambda.csproj",
"chars": 1931,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.1</TargetFramework>\n <Gener"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Extensions/ServicesExtensions.cs",
"chars": 484,
"preview": "using Microsoft.Extensions.Configuration;\nusing Microsoft.Extensions.DependencyInjection;\n\nnamespace DotNetServerless.La"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/CreateItemFunction.cs",
"chars": 1118,
"preview": "using System;\nusing System.Threading.Tasks;\nusing Amazon.Lambda.APIGatewayEvents;\nusing Amazon.Lambda.Core;\nusing DotNet"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/GetItemFunction.cs",
"chars": 1194,
"preview": "using System;\nusing System.Threading.Tasks;\nusing Amazon.Lambda.APIGatewayEvents;\nusing Amazon.Lambda.Core;\nusing DotNet"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Functions/UpdateItemFunction.cs",
"chars": 1109,
"preview": "using System;\nusing System.Threading.Tasks;\nusing Amazon.Lambda.APIGatewayEvents;\nusing Amazon.Lambda.Core;\nusing DotNet"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Program.cs",
"chars": 125,
"preview": "namespace DotNetServerless.Lambda\n{\n public class Program\n {\n public static void Main(string[] args)\n {\n }\n "
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/Startup.cs",
"chars": 1262,
"preview": "using System.IO;\nusing DotNetServerless.Application.Infrastructure;\nusing DotNetServerless.Application.Infrastructure.C"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/package.json",
"chars": 635,
"preview": "{\n \"name\": \"aws-dotnet-rest-api-with-dynamodb\",\n \"description\": \"Reading/Writing operations using .NET Core and Dynamo"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/src/DotNetServerless.Lambda/serverless.yml",
"chars": 1873,
"preview": "\nservice: ${file(env.configs.yml):feature}\n\nframeworkVersion: \">=1.6.0 <2.1.0\"\n\nprovider:\n name: aws\n stackName: ${fil"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/DotNetServerless.Tests.csproj",
"chars": 710,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.1</TargetFramework>\n\n "
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/CreateItemFunctionTests.cs",
"chars": 1789,
"preview": "using System.Threading;\nusing System.Threading.Tasks;\nusing Amazon.Lambda.APIGatewayEvents;\nusing DotNetServerless.Appli"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/GetItemFunctionTests.cs",
"chars": 2460,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Amazon.Lambd"
},
{
"path": "aws-dotnet-rest-api-with-dynamodb/tests/DotNetServerless.Tests/Functions/UpdateItemFunctionTests.cs",
"chars": 1780,
"preview": "using System.Threading;\nusing System.Threading.Tasks;\nusing Amazon.DynamoDBv2.Model;\nusing Amazon.Lambda.APIGatewayEvent"
},
{
"path": "aws-ffmpeg-layer/.gitignore",
"chars": 34,
"preview": ".serverless/\nnode_modules/\nlayer/\n"
},
{
"path": "aws-ffmpeg-layer/README.md",
"chars": 603,
"preview": "<!--\ntitle: .'AWS FFmepg Layer'\ndescription: 'AWS FFmepg Layer & a service using it to create GIFs'\nframework: v1\nplatfo"
},
{
"path": "aws-ffmpeg-layer/build.sh",
"chars": 233,
"preview": "#!/bin/bash\nmkdir -p layer\ncd layer\nrm -rf *\ncurl -O https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar"
},
{
"path": "aws-ffmpeg-layer/handler.js",
"chars": 1466,
"preview": "const { spawnSync } = require(\"child_process\");\nconst { readFileSync, writeFileSync, unlinkSync } = require(\"fs\");\nconst"
},
{
"path": "aws-ffmpeg-layer/package.json",
"chars": 123,
"preview": "{\n \"name\": \"aws-lambda-layer\",\n \"description\": \"\",\n \"version\": \"0.1.0\",\n \"dependencies\": {},\n \"devDependencies\": {}"
},
{
"path": "aws-ffmpeg-layer/serverless.yml",
"chars": 481,
"preview": "service: gifmaker\nframeworkVersion: \">=2.24.0\"\n\nprovider:\n name: aws\n runtime: nodejs12.x\n iamRoleStatements:\n - E"
},
{
"path": "aws-golang-auth-examples/.gitignore",
"chars": 41,
"preview": "bin/**\nvendor\n.serverless\n*.coverprofile\n"
},
{
"path": "aws-golang-auth-examples/Makefile",
"chars": 412,
"preview": "help:\n\t@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = \":.*?## \"}; {printf \"\\033[36m%-3"
},
{
"path": "aws-golang-auth-examples/README.md",
"chars": 1163,
"preview": "<!--\ntitle: .'AWS Golang Auth'\ndescription: 'This example shows you how to setup auth in front of a AWS Lambda function'"
},
{
"path": "aws-golang-auth-examples/functions/auth/auth_suite_test.go",
"chars": 185,
"preview": "package main_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestAuth(t *test"
},
{
"path": "aws-golang-auth-examples/functions/auth/main.go",
"chars": 1161,
"preview": "package main\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambd"
},
{
"path": "aws-golang-auth-examples/functions/auth/main_test.go",
"chars": 1704,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)"
},
{
"path": "aws-golang-auth-examples/functions/auth2/auth_suite_test.go",
"chars": 185,
"preview": "package main_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestAuth(t *test"
},
{
"path": "aws-golang-auth-examples/functions/auth2/main.go",
"chars": 1265,
"preview": "package main\n\nimport (\n\t\"errors\"\n\t\"strings\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambd"
},
{
"path": "aws-golang-auth-examples/functions/auth2/main_test.go",
"chars": 1386,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)"
},
{
"path": "aws-golang-auth-examples/functions/hello-world/hello_world_suite_test.go",
"chars": 197,
"preview": "package main_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestHelloWorld(t"
},
{
"path": "aws-golang-auth-examples/functions/hello-world/main.go",
"chars": 338,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n)\n\nfunc handler(req"
},
{
"path": "aws-golang-auth-examples/functions/hello-world/main_test.go",
"chars": 548,
"preview": "package main\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/o"
},
{
"path": "aws-golang-auth-examples/functions/hello-world2/hello_world_suite_test.go",
"chars": 197,
"preview": "package main_test\n\nimport (\n\t\"testing\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nfunc TestHelloWorld(t"
},
{
"path": "aws-golang-auth-examples/functions/hello-world2/main.go",
"chars": 697,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\""
},
{
"path": "aws-golang-auth-examples/functions/hello-world2/main_test.go",
"chars": 1091,
"preview": "package main\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/o"
},
{
"path": "aws-golang-auth-examples/go.mod",
"chars": 433,
"preview": "module github.com/srbry/go-serverless-example\n\nrequire (\n\tgithub.com/aws/aws-lambda-go v1.6.0\n\tgithub.com/davecgh/go-spe"
},
{
"path": "aws-golang-auth-examples/go.sum",
"chars": 3249,
"preview": "github.com/aws/aws-lambda-go v1.6.0 h1:T+u/g79zPKw1oJM7xYhvpq7i4Sjc0iVsXZUaqRVVSOg=\ngithub.com/aws/aws-lambda-go v1.6.0/"
},
{
"path": "aws-golang-auth-examples/package.json",
"chars": 411,
"preview": "{\n \"name\": \"aws-golang-auth-examples\",\n \"version\": \"1.0.0\",\n \"description\": \"These example shows how to run a Golang "
},
{
"path": "aws-golang-auth-examples/serverless.yml",
"chars": 658,
"preview": "service: hello-world\n\nprovider:\n name: aws\n runtime: go1.x\n region: eu-west-1\n memorySize: 128\n\npackage:\n exclude:\n"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/Gopkg.toml",
"chars": 965,
"preview": "# Gopkg.toml example\n#\n# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md\n# for detailed Gopkg.toml"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/Makefile",
"chars": 294,
"preview": "build:\n\tdep ensure -v\n\tenv GOARCH=amd64 GOOS=linux go build -ldflags=\"-s -w\" -o bin/aws-golang-dynamo-stream-to-elastics"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/README.md",
"chars": 2854,
"preview": "<!--\ntitle: .'DynamoDB Stream To Elasticsearch'\ndescription: 'Stream data from DynamoDB to Elasticsearch'\nframework: v1\n"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/cmd/aws-golang-dynamo-stream-to-elasticsearch/main.go",
"chars": 1361,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/olivere/elastic\"\n\t\"github.com/serverless/examples/aws-golan"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/cmd/seed-dynamo/main.go",
"chars": 9071,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"math/rand\"\n\t\"time\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/dstream/details.go",
"chars": 1593,
"preview": "package dstream\n\nimport (\n\t\"errors\"\n\n\t\"github.com/aws/aws-sdk-go/aws\"\n\t\"github.com/aws/aws-sdk-go/service/dynamodb\"\n\t\"gi"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/dstream/update.go",
"chars": 3596,
"preview": "package dstream\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-sdk-"
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/package.json",
"chars": 492,
"preview": "{\n \"name\": \"aws-golang-dynamo-stream-to-elasticsearch\",\n \"version\": \"1.0.0\",\n \"description\": \"This example deploys a "
},
{
"path": "aws-golang-dynamo-stream-to-elasticsearch/serverless.yml",
"chars": 3040,
"preview": "service: aws-golang-dynamo-stream-to-elasticsearch\n\nprovider:\n name: aws\n runtime: go1.x\n environment:\n ELASTICSEA"
},
{
"path": "aws-golang-googlemap/Gopkg.toml",
"chars": 608,
"preview": "# Gopkg.toml example\n#\n# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md\n# for detailed Gopkg.toml"
},
{
"path": "aws-golang-googlemap/Makefile",
"chars": 543,
"preview": ".PHONY: build clean deploy\n\nbuild:\n\tdep ensure -v\n\tenv GOARCH=amd64 GOOS=linux go build -ldflags=\"-s -w\" -o bin/getgeolo"
},
{
"path": "aws-golang-googlemap/README.md",
"chars": 1066,
"preview": "<!--\ntitle: .'google map api'\ndescription: 'Serverless example using golang to hit google map api'\nframework: v1\nplatfor"
},
{
"path": "aws-golang-googlemap/geomap/geomap.go",
"chars": 10323,
"preview": "package geomap\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\n/*\n\tGoogle Map API package\n\tC"
},
{
"path": "aws-golang-googlemap/getgeodetail/main.go",
"chars": 1336,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"gomapservice/geomap\"\n\t\"os\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n"
},
{
"path": "aws-golang-googlemap/getgeolocation/main.go",
"chars": 1330,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"gomapservice/geomap\"\n\t\"os\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n"
},
{
"path": "aws-golang-googlemap/getnearbylocation/main.go",
"chars": 1645,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"gomapservice/geomap\"\n\t\"os\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n"
},
{
"path": "aws-golang-googlemap/getsearchlocation/main.go",
"chars": 1332,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"gomapservice/geomap\"\n\t\"os\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n"
},
{
"path": "aws-golang-googlemap/serverless.yml",
"chars": 3680,
"preview": "# Welcome to Serverless!\n#\n# This file is the main config file for your service.\n# It's very minimal at this point and u"
},
{
"path": "aws-golang-http-get-post/Gopkg.toml",
"chars": 608,
"preview": "# Gopkg.toml example\n#\n# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md\n# for detailed Gopkg.toml"
},
{
"path": "aws-golang-http-get-post/Makefile",
"chars": 468,
"preview": ".PHONY: build clean deploy\n\nbuild:\n\tcd getFolder && env GOARCH=amd64 GOOS=linux go build -ldflags=\"-s -w\" -o ../bin/getB"
},
{
"path": "aws-golang-http-get-post/README.md",
"chars": 819,
"preview": "<!--\ntitle: .'HTTP GET and POST'\ndescription: 'Boilerplate code for Golang with GET and POST example'\nframework: v1\nplat"
},
{
"path": "aws-golang-http-get-post/getFolder/getExample.go",
"chars": 627,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n)\n\n// Handl"
},
{
"path": "aws-golang-http-get-post/getFolder/getQueryExample.go",
"chars": 634,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n)\n\n// Handl"
},
{
"path": "aws-golang-http-get-post/getFolder/go.mod",
"chars": 72,
"preview": "module getFolder\n\ngo 1.17\n\nrequire github.com/aws/aws-lambda-go v1.26.0\n"
},
{
"path": "aws-golang-http-get-post/getFolder/go.sum",
"chars": 1620,
"preview": "github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/aws/aws-lambda-go v1"
},
{
"path": "aws-golang-http-get-post/package.json",
"chars": 227,
"preview": "{\n \"name\": \"aws-golang-http-get-post\",\n \"version\": \"1.29.2\",\n \"description\": \"Example on Making Parameterized Get and"
},
{
"path": "aws-golang-http-get-post/postFolder/go.mod",
"chars": 73,
"preview": "module postFolder\n\ngo 1.17\n\nrequire github.com/aws/aws-lambda-go v1.26.0\n"
},
{
"path": "aws-golang-http-get-post/postFolder/go.sum",
"chars": 1620,
"preview": "github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/aws/aws-lambda-go v1"
},
{
"path": "aws-golang-http-get-post/postFolder/postExample.go",
"chars": 1422,
"preview": "package main\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n)"
},
{
"path": "aws-golang-http-get-post/serverless.yml",
"chars": 3506,
"preview": "# Welcome to Serverless!\n#\n# This file is the main config file for your service.\n# It's very minimal at this point and u"
},
{
"path": "aws-golang-rest-api-with-dynamodb/.gitignore",
"chars": 298,
"preview": ".serverless\nbin\n*.pyc\n*.pyo\n\n# Binaries for programs and plugins\n*.exe\n*.exe~\n*.dll\n*.so\n*.dylib\n\n# Test binary, built w"
},
{
"path": "aws-golang-rest-api-with-dynamodb/Makefile",
"chars": 670,
"preview": ".PHONY: build clean deploy\n\nbuild:\n\tenv GOOS=linux GOARCH=amd64 go build -ldflags=\"-s -w\" -o bin/create todos/create.go\n"
},
{
"path": "aws-golang-rest-api-with-dynamodb/README.md",
"chars": 1563,
"preview": "<!--\ntitle: 'aws-golang-rest-api-with-dynamodb'\ndescription: 'Boilerplate code for Golang CRUD Operations'\nframework: v1"
},
{
"path": "aws-golang-rest-api-with-dynamodb/go.mod",
"chars": 222,
"preview": "module github.com/serverless/examples/aws-golang-rest-api-with-dynamodb\n\ngo 1.15\n\nrequire (\n\tgithub.com/aws/aws-lambda-g"
},
{
"path": "aws-golang-rest-api-with-dynamodb/go.sum",
"chars": 3433,
"preview": "github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=\ngithub.com/aws/aws-lambda-go v1"
},
{
"path": "aws-golang-rest-api-with-dynamodb/package.json",
"chars": 195,
"preview": "{\n \"name\": \"aws-golang-rest-api-with-dynamodb\",\n \"version\": \"1.0.0\",\n \"description\": \"Serverless CRUD service e"
},
{
"path": "aws-golang-rest-api-with-dynamodb/serverless.yml",
"chars": 2007,
"preview": "app: aws-golang-rest-api-with-dynamodb\nservice: aws-golang-rest-api-with-dynamodb\n\nframeworkVersion: \">=2.24.0\"\n\nprovide"
},
{
"path": "aws-golang-rest-api-with-dynamodb/todos/create.go",
"chars": 2218,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n\t\"github.com/aws/aw"
},
{
"path": "aws-golang-rest-api-with-dynamodb/todos/delete.go",
"chars": 1249,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n\t\"github.com/aws/aw"
},
{
"path": "aws-golang-rest-api-with-dynamodb/todos/get.go",
"chars": 1972,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n\t\"github.com/aws/aw"
},
{
"path": "aws-golang-rest-api-with-dynamodb/todos/list.go",
"chars": 1927,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n\t\"github.com/aws/aw"
},
{
"path": "aws-golang-rest-api-with-dynamodb/todos/update.go",
"chars": 1826,
"preview": "package main\n\nimport (\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n\t\"github.com/aws/aw"
},
{
"path": "aws-golang-s3-file-replicator/.gitignore",
"chars": 317,
"preview": "# Serverless directories\n.serverless\n\n# golang output binary directory\nbin\n\n# golang vendor (dependencies) directory\nven"
},
{
"path": "aws-golang-s3-file-replicator/Makefile",
"chars": 289,
"preview": ".PHONY: build clean deploy gomodgen\n\nbuild: gomodgen\n\texport GO111MODULE=on\n\tenv GOARCH=amd64 GOOS=linux go build -ldfla"
},
{
"path": "aws-golang-s3-file-replicator/README.md",
"chars": 758,
"preview": "<!--\ntitle: .'AWS S3 Bucket Replicator in Golang'\ndescription: 'Boilerplate code for Golang with S3 object create event "
},
{
"path": "aws-golang-s3-file-replicator/go.mod",
"chars": 163,
"preview": "module github.com/examples/aws-golang-s3-file-replicator\n\ngo 1.14\n\nrequire (\n\tgithub.com/aws/aws-lambda-go v1.6.0\n\tgithu"
},
{
"path": "aws-golang-s3-file-replicator/go.sum",
"chars": 1653,
"preview": "github.com/aws/aws-lambda-go v1.6.0 h1:T+u/g79zPKw1oJM7xYhvpq7i4Sjc0iVsXZUaqRVVSOg=\ngithub.com/aws/aws-lambda-go v1.6.0/"
},
{
"path": "aws-golang-s3-file-replicator/gomod.sh",
"chars": 302,
"preview": "#!/bin/bash\nset -eu\n\nif [ -f ./go.mod ]; then\n exit 0\nfi\n\ntouch go.mod\n\nPROJECT_NAME=$(basename $(pwd | xargs dirname"
},
{
"path": "aws-golang-s3-file-replicator/serverless.yml",
"chars": 854,
"preview": "service: aws-golang-s3-file-replicator\nframeworkVersion: \">=2.24.0\"\n\ncustom:\n inputBucket: replicator-input-101\n outpu"
},
{
"path": "aws-golang-s3-file-replicator/src/main.go",
"chars": 1253,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/la"
},
{
"path": "aws-golang-simple-http-endpoint/Gopkg.toml",
"chars": 608,
"preview": "# Gopkg.toml example\n#\n# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md\n# for detailed Gopkg.toml"
},
{
"path": "aws-golang-simple-http-endpoint/Makefile",
"chars": 300,
"preview": "build:\n\tdep ensure -v\n\tenv GOARCH=amd64 GOOS=linux go build -ldflags=\"-s -w\" -o bin/hello hello/main.go\n\tenv GOARCH=amd6"
},
{
"path": "aws-golang-simple-http-endpoint/README.md",
"chars": 316,
"preview": "<!--\ntitle: TODO\ndescription: This example demonstrates how to setup a simple HTTP endpoint in Go.\nlayout: Doc\nframework"
},
{
"path": "aws-golang-simple-http-endpoint/hello/main.go",
"chars": 1093,
"preview": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws"
},
{
"path": "aws-golang-simple-http-endpoint/package.json",
"chars": 235,
"preview": "{\n \"name\": \"aws-golang-simple-http-endpoint\",\n \"version\": \"0.0.1\",\n \"description\": \"Example demonstrates how to setup"
},
{
"path": "aws-golang-simple-http-endpoint/serverless.yml",
"chars": 381,
"preview": "service: aws-golang-simple-http-endpoint\nframeworkVersion: '2'\n\nprovider:\n name: aws\n runtime: go1.x\n\nfunctions:\n hel"
},
{
"path": "aws-golang-simple-http-endpoint/world/main.go",
"chars": 1092,
"preview": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws"
},
{
"path": "aws-golang-stream-kinesis-to-elasticsearch/Gopkg.toml",
"chars": 806,
"preview": "# Gopkg.toml example\n#\n# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html\n# for detailed Gopkg.toml documentat"
},
{
"path": "aws-golang-stream-kinesis-to-elasticsearch/Makefile",
"chars": 202,
"preview": "build:\n\tdep ensure -v\n\tenv GOARCH=amd64 GOOS=linux go build -ldflags=\"-s -w\" -o bin/stream main.go\n\n.PHONY: clean\nclean:"
},
{
"path": "aws-golang-stream-kinesis-to-elasticsearch/README.md",
"chars": 347,
"preview": "<!--\ntitle: TODO\ndescription: This example demonstrates how to stream kinesis information into elasticsearch in a golang"
},
{
"path": "aws-golang-stream-kinesis-to-elasticsearch/elastic/elastic.go",
"chars": 1212,
"preview": "package elastic\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/olivere/e"
},
{
"path": "aws-golang-stream-kinesis-to-elasticsearch/main.go",
"chars": 505,
"preview": "package main\n\nimport (\n\t\"context\"\n\t\"os\"\n\n\t\"github.com/aws/aws-lambda-go/events\"\n\t\"github.com/aws/aws-lambda-go/lambda\"\n\n"
},
{
"path": "aws-golang-stream-kinesis-to-elasticsearch/package.json",
"chars": 243,
"preview": "{\n \"name\": \"aws-golang-stream-kinesis-to-elasticsearch\",\n \"version\": \"0.0.1\",\n \"description\": \"Pull data from AWS Kin"
},
{
"path": "aws-golang-stream-kinesis-to-elasticsearch/serverless.yml",
"chars": 524,
"preview": "service: aws-golang-kinesis-to-elasticsearch\n\nframeworkVersion: \">=1.28.0 <2.0.0\"\n\nprovider:\n name: aws\n runtime: go1."
},
{
"path": "aws-java-simple-http-endpoint/.gitignore",
"chars": 142,
"preview": "*.class\n.gradle\n/build/\n/bin/\n/.settings/\n.project\n.classpath\ntarget\n\n# Package Files\n*.jar\n*.war\n*.ear\n\n# Serverless di"
},
{
"path": "aws-java-simple-http-endpoint/README.md",
"chars": 4424,
"preview": "<!--\ntitle: 'AWS Simple HTTP Endpoint example in Java'\ndescription: 'This example demonstrates how to setup a simple HTT"
},
{
"path": "aws-java-simple-http-endpoint/build.gradle",
"chars": 789,
"preview": "apply plugin: 'java'\n\nrepositories {\n mavenCentral()\n}\n\nsourceCompatibility = 1.8\ntargetCompatibility = 1.8\n\ndependen"
},
{
"path": "aws-java-simple-http-endpoint/gradle/wrapper/gradle-wrapper.properties",
"chars": 232,
"preview": "#Sat Jan 14 14:33:39 PST 2017\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_"
},
{
"path": "aws-java-simple-http-endpoint/gradlew",
"chars": 5299,
"preview": "#!/usr/bin/env sh\n\n##############################################################################\n##\n## Gradle start up"
},
{
"path": "aws-java-simple-http-endpoint/gradlew.bat",
"chars": 2260,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
},
{
"path": "aws-java-simple-http-endpoint/pom.xml",
"chars": 2314,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocat"
},
{
"path": "aws-java-simple-http-endpoint/serverless.yml",
"chars": 313,
"preview": "service: aws-java-simple-http-endpoint\nframeworkVersion: '2'\n\nprovider:\n name: aws\n runtime: java8\n\npackage:\n artifac"
},
{
"path": "aws-java-simple-http-endpoint/src/main/java/com/serverless/ApiGatewayResponse.java",
"chars": 3346,
"preview": "package com.serverless;\n\nimport java.nio.charset.StandardCharsets;\nimport java.util.Base64;\nimport java.util.Collections"
},
{
"path": "aws-java-simple-http-endpoint/src/main/java/com/serverless/Handler.java",
"chars": 919,
"preview": "package com.serverless;\n\nimport java.util.Date;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport org.apache.log4j"
},
{
"path": "aws-java-simple-http-endpoint/src/main/java/com/serverless/Response.java",
"chars": 205,
"preview": "package com.serverless;\n\npublic class Response {\n\n\tprivate final String message;\n\n\tpublic Response(String message) {\n\t\tt"
},
{
"path": "aws-java-simple-http-endpoint/src/main/resources/log4j.properties",
"chars": 291,
"preview": "log = .\nlog4j.rootLogger = DEBUG, LAMBDA\n\nlog4j.appender.LAMBDA=com.amazonaws.services.lambda.runtime.log4j.LambdaAppend"
},
{
"path": "aws-multiple-runtime/README.md",
"chars": 331,
"preview": "<!--\ntitle: TODO\ndescription: This example demonstrates how you can run multiple runtimes in AWS Lambda.\nlayout: Doc\nfra"
},
{
"path": "aws-multiple-runtime/api/.gitignore",
"chars": 86,
"preview": "# package directories\nnode_modules\njspm_packages\n\n# Serverless directories\n.serverless"
},
{
"path": "aws-multiple-runtime/api/handler.js",
"chars": 254,
"preview": "'use strict';\n\nmodule.exports.timestamp = (event, context, callback) => {\n const response = {\n statusCode: 200,\n "
},
{
"path": "aws-multiple-runtime/serverless.yml",
"chars": 334,
"preview": "service: hellotime-app\nprovider:\n name: aws\n\nfunctions:\n hello:\n runtime: python3.6\n events:\n - httpApi:\n "
},
{
"path": "aws-multiple-runtime/web/handler.py",
"chars": 714,
"preview": "from datetime import datetime\nimport http.client\n\ndef hello(event, context):\n rc = event[\"requestContext\"]\n servic"
},
{
"path": "aws-node/.gitignore",
"chars": 24,
"preview": "node_modules\n.serverless"
},
{
"path": "aws-node/README.md",
"chars": 2358,
"preview": "<!--\ntitle: 'AWS NodeJS Example'\ndescription: 'This template demonstrates how to deploy a simple NodeJS function running"
},
{
"path": "aws-node/handler.js",
"chars": 183,
"preview": "exports.hello = async (event) => {\n return {\n statusCode: 200,\n body: JSON.stringify({\n message: 'Go Serverl"
},
{
"path": "aws-node/serverless.yml",
"chars": 177,
"preview": "service: aws-node # NOTE: update this with your service name\n\nframeworkVersion: '4'\n\nprovider:\n name: aws\n runtime: no"
},
{
"path": "aws-node-alexa-skill/.gitignore",
"chars": 25,
"preview": "node_modules\n.serverless\n"
},
{
"path": "aws-node-alexa-skill/README.md",
"chars": 3719,
"preview": "<!--\ntitle: 'AWS Serverless Alexa Skill example in NodeJS'\ndescription: 'This example demonstrates how to setup your own"
},
{
"path": "aws-node-alexa-skill/handler.js",
"chars": 594,
"preview": "'use strict';\n\n// Returns a random integer between min (inclusive) and max (inclusive)\nconst getRandomInt = (min, max) ="
},
{
"path": "aws-node-alexa-skill/package.json",
"chars": 191,
"preview": "{\n \"name\": \"aws-alexa-skill\",\n \"version\": \"1.0.0\",\n \"description\": \"This example demonstrates how to use an AWS Lambd"
},
{
"path": "aws-node-alexa-skill/serverless.yml",
"chars": 202,
"preview": "service: aws-node-alexa-skill\n\nframeworkVersion: \">=1.4.0 <2.0.0\"\n\nprovider:\n name: aws\n runtime: nodejs12.x\n\nfunction"
},
{
"path": "aws-node-auth0-cognito-custom-authorizers-api/.gitignore",
"chars": 25,
"preview": "node_modules\n.serverless\n"
},
{
"path": "aws-node-auth0-cognito-custom-authorizers-api/README.md",
"chars": 2118,
"preview": "<!--\ntitle: 'API Gateway Authorizer Function for Auth0 or AWS Cognito using RS256 JSON Web Key Sets tokens.'\ndescription"
},
{
"path": "aws-node-auth0-cognito-custom-authorizers-api/auth.js",
"chars": 2271,
"preview": "'use strict';\n\nconst jwk = require('jsonwebtoken');\nconst jwkToPem = require('jwk-to-pem');\nconst request = require('req"
},
{
"path": "aws-node-auth0-cognito-custom-authorizers-api/handler.js",
"chars": 285,
"preview": "'use strict';\n\n// Public API\nmodule.exports.publicEndpoint = (event, context, cb) => {\n cb(null, { message: 'Welcome to"
},
{
"path": "aws-node-auth0-cognito-custom-authorizers-api/package.json",
"chars": 330,
"preview": "{\n \"name\": \"aws-node-auth0-cognito-custom-authorizers-api\",\n \"version\": \"1.0.0\",\n \"description\": \"Authorize your API "
},
{
"path": "aws-node-auth0-cognito-custom-authorizers-api/serverless.yml",
"chars": 715,
"preview": "\nservice: aws-node-auth0-cognito-custom-authorizers-api\n\nprovider:\n name: aws\n runtime: nodejs12.x\n\nfunctions:\n publi"
},
{
"path": "aws-node-auth0-custom-authorizers-api/.gitignore",
"chars": 67,
"preview": "node_modules\n.serverless\nsecrets.json\npublic_key\n/frontend/misc.md\n"
},
{
"path": "aws-node-auth0-custom-authorizers-api/README.md",
"chars": 3413,
"preview": "<!--\ntitle: 'AWS API Gateway Custom Authorizer Function with Auth0 example in NodeJS'\ndescription: 'This is an example o"
},
{
"path": "aws-node-auth0-custom-authorizers-api/frontend/app.css",
"chars": 1158,
"preview": "html, body {\n padding: 0px;\n margin: 0px;\n}\n\nbody {\n font-family: \"proxima-nova\", sans-serif;\n text-align: center;\n "
},
{
"path": "aws-node-auth0-custom-authorizers-api/frontend/app.js",
"chars": 3485,
"preview": "/* global window document localStorage fetch alert */\n\n// Fill in with your values\nconst AUTH0_CLIENT_ID = 'your-auth0-c"
},
{
"path": "aws-node-auth0-custom-authorizers-api/frontend/index.html",
"chars": 1148,
"preview": "<!doctype html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <script src=\"https://cdn.auth0.com/js/lock/11.4.0/lock.min.js\">"
},
{
"path": "aws-node-auth0-custom-authorizers-api/handler.js",
"chars": 2750,
"preview": "const jwt = require('jsonwebtoken');\n\n// Set in `environment` of serverless.yml\nconst AUTH0_CLIENT_ID = process.env.AUTH"
},
{
"path": "aws-node-auth0-custom-authorizers-api/package.json",
"chars": 279,
"preview": "{\n \"name\": \"aws-auth0-api-gateway\",\n \"version\": \"1.0.0\",\n \"description\": \"Demonstration of protecting API gateway end"
},
{
"path": "aws-node-auth0-custom-authorizers-api/public_key-example",
"chars": 311,
"preview": "-----BEGIN CERTIFICATE-----\nPUBLIC KEY - can be found in `https://manage.auth0.com -> applications->${YOUR_APP_NAME}->se"
},
{
"path": "aws-node-auth0-custom-authorizers-api/secrets.example.json",
"chars": 42,
"preview": "{\n \"AUTH0_CLIENT_ID\": \"your-client-id\"\n}\n"
},
{
"path": "aws-node-auth0-custom-authorizers-api/serverless.yml",
"chars": 1561,
"preview": "\nservice: aws-custom-authorizer-auth0\n\nplugins:\n - serverless-offline\n\nprovider:\n name: aws\n runtime: nodejs12.x\n re"
},
{
"path": "aws-node-cdk-extension/README.md",
"chars": 506,
"preview": "# Welcome to your CDK JavaScript project\n\nThis is a blank project for CDK development with JavaScript.\n\nThe `cdk.json` f"
},
{
"path": "aws-node-cdk-extension/bin/example.js",
"chars": 916,
"preview": "#!/usr/bin/env node\n\nconst cdk = require('aws-cdk-lib');\nconst { ExampleStack } = require('../lib/example-stack');\n\ncons"
},
{
"path": "aws-node-cdk-extension/cdk.json",
"chars": 2908,
"preview": "{\n \"app\": \"node bin/example.js\",\n \"progress\": \"events\",\n \"watch\": {\n \"include\": [\n \"**\"\n ],\n \"exclude\":"
},
{
"path": "aws-node-cdk-extension/lib/example-stack.js",
"chars": 912,
"preview": "const { Stack, Duration, CfnOutput } = require('aws-cdk-lib')\nconst sqs = require('aws-cdk-lib/aws-sqs')\n\nclass ExampleS"
},
{
"path": "aws-node-cdk-extension/package.json",
"chars": 252,
"preview": "{\n \"name\": \"example\",\n \"version\": \"0.1.0\",\n \"bin\": {\n \"example\": \"bin/example.js\"\n },\n \"devDependencies\": {\n "
},
{
"path": "aws-node-cdk-extension/serverless.yml",
"chars": 113,
"preview": "service: aws-node-cdk-extension\n\ncdk-instance:\n extension: serverless/cdk@latest\n config:\n region: us-east-2"
},
{
"path": "aws-node-dynamic-image-resizer/Dockerfile",
"chars": 286,
"preview": "FROM amazonlinux\nWORKDIR /deploy\nRUN yum -y install make gcc*\nRUN curl --silent --location https://rpm.nodesource.com/se"
},
{
"path": "aws-node-dynamic-image-resizer/README.md",
"chars": 2776,
"preview": "<!--\ntitle: 'Dynamic Image Resizing API'\ndescription: 'This example shows you how to setup a dynamic image resizer API'\n"
},
{
"path": "aws-node-dynamic-image-resizer/config/pull-secret.sh",
"chars": 196,
"preview": "echo \"🔍 $(tput bold)Pull secret$(tput sgr0)\"\n\nif [ \"$#\" -lt 1 ]; then\n printf \"Secret key: \"\n read key\nelse\n key=$1\n"
},
{
"path": "aws-node-dynamic-image-resizer/config/push-secret.sh",
"chars": 275,
"preview": "echo \"💾 $(tput bold)Push secret$(tput sgr0)\"\n\nif [ \"$#\" -lt 2 ]; then\n printf \"Secret key: \"\n read key\n printf \"Secr"
},
{
"path": "aws-node-dynamic-image-resizer/deploy.sh",
"chars": 245,
"preview": "stage=${STAGE}\nregion=${REGION}\nbucket=${BUCKET}\nsecrets='/deploy/secrets/secrets.json'\n\nsls config credentials \\\n --pr"
},
{
"path": "aws-node-dynamic-image-resizer/docker-compose.yml",
"chars": 143,
"preview": "version: \"3\"\nservices:\n image-resize:\n build: .\n volumes:\n - ./secrets:/deploy/secrets\n env_file:\n -"
},
{
"path": "aws-node-dynamic-image-resizer/package.json",
"chars": 1511,
"preview": "{\n \"name\": \"aws-node-dynamic-image-resizer\",\n \"version\": \"1.0.0\",\n \"license\": \"MIT\",\n \"author\": \"Sebastian Borza\",\n "
},
{
"path": "aws-node-dynamic-image-resizer/secrets/secrets.env",
"chars": 59,
"preview": "SLS_KEY=\nSLS_SECRET=\nPROFILE=\nSTAGE=dev-1\nREGION=us-east-1\n"
},
{
"path": "aws-node-dynamic-image-resizer/secrets/secrets.json",
"chars": 14,
"preview": "{\"DOMAIN\":\"\"}\n"
},
{
"path": "aws-node-dynamic-image-resizer/serverless.yml",
"chars": 1391,
"preview": "service:\n name: ${self:custom.serviceName}\n\nplugins:\n - serverless-offline\n - serverless-webpack\n\nprovider:\n name: a"
},
{
"path": "aws-node-dynamic-image-resizer/src/handlers/resizer/index.js",
"chars": 440,
"preview": "import { resizeHandler } from './resizeHandler'\n\nexport const handler = async (event) => {\n try {\n const imagePath ="
},
{
"path": "aws-node-dynamic-image-resizer/src/handlers/resizer/resizeHandler.js",
"chars": 1054,
"preview": "import { s3Handler } from './s3Handler'\n\n//Core image processing package\nconst sharp = require('sharp')\n\nclass ResizerHa"
},
{
"path": "aws-node-dynamic-image-resizer/src/handlers/resizer/s3Handler.js",
"chars": 570,
"preview": "import * as AWS from 'aws-sdk'\nimport stream from 'stream'\n\nAWS.config.region = 'us-east-1'\nconst S3 = new AWS.S3()\n\ncla"
},
{
"path": "aws-node-dynamic-image-resizer/src/lib/BaseHandler.js",
"chars": 428,
"preview": "export default class BaseHandler {\n constructor() {\n this.handlerName = this.constructor.name\n }\n\n async execute(e"
},
{
"path": "aws-node-dynamic-image-resizer/webpack.config.js",
"chars": 440,
"preview": "const slsw = require('serverless-webpack')\nconst webpack = require('webpack')\n\nmodule.exports = {\n entry: slsw.lib.entr"
},
{
"path": "aws-node-dynamodb-backup/README.md",
"chars": 963,
"preview": "<!--\ntitle: TODO\ndescription: This examples shows your how to create a backup of your DynamoDB table to S3.\nlayout: Doc\n"
},
{
"path": "aws-node-dynamodb-backup/handler.js",
"chars": 1021,
"preview": "'use strict';\n\nconst aws = require('aws-sdk');\n\nconst s3 = new aws.S3({ region: 'ap-southeast-1' });\n\nmodule.exports.bac"
},
{
"path": "aws-node-dynamodb-backup/package.json",
"chars": 262,
"preview": "{\n \"name\": \"aws-node-dynamodb-backup\",\n \"version\": \"1.0.0\",\n \"description\": \"Serverless DynamoDB changes backed up to"
},
{
"path": "aws-node-dynamodb-backup/serverless.yml",
"chars": 980,
"preview": "service: serverless-dynamodb-backup\n\ncustom:\n bucket: EXAMPLE\n dynamoDBTableName: \"${opt:stage, self:provider.stage}_E"
},
{
"path": "aws-node-env-variables/.gitignore",
"chars": 25,
"preview": "node_modules\n.serverless\n"
},
{
"path": "aws-node-env-variables/README.md",
"chars": 4047,
"preview": "<!--\ntitle: 'AWS Serverless Environment Variables Usage example in NodeJS'\ndescription: 'This example demonstrates how t"
},
{
"path": "aws-node-env-variables/handler.js",
"chars": 1240,
"preview": "'use strict';\n\nmodule.exports.createUser = (event, context, callback) => {\n // logs `4096`\n console.log('PASSWORD_ITER"
},
{
"path": "aws-node-env-variables/package.json",
"chars": 188,
"preview": "{\n \"name\": \"aws-env-variables\",\n \"version\": \"1.0.0\",\n \"description\": \"This example demonstrates how to use environmen"
},
{
"path": "aws-node-env-variables/serverless.yml",
"chars": 382,
"preview": "service: function-with-environment-variables\n\nframeworkVersion: \">=1.2.0 <2.0.0\"\n\nprovider:\n name: aws\n runtime: nodej"
}
]
// ... and 849 more files (download for full content)
About this extraction
This page contains the full source code of the serverless/examples GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1049 files (1.3 MB), approximately 369.0k tokens, and a symbol index with 560 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.