This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path: / | |
method: get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: anchor-example | |
defaultHttp: &defaultHttp | |
path: / | |
method: get | |
provider: | |
name: aws | |
runtime: nodejs8.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
functions: | |
hello-world: | |
handler: hello-world.handler | |
stepFunctions: | |
stateMachines: | |
myStateMachine: | |
definition: | |
StartAt: firstTask | |
States: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Type": "SubscriptionConfirmation", | |
"MessageId": "eeb2e742-4746-4bf9-9add-32e45df8bfc1", | |
"Token": "2336412f37fb687f5d51e6e241dbca52e8c2620f5aa61c0e44f2e34cdac05af6c8d340f1a2314eff0f5dc1ee0f2e949a2fd5aa4f97d5f3e3a428c654a1eb46b096f357977b59f06c8591623d7f102a14d688dcb73291966f6208f2b07037659305f755718536b0b8de10cdb68271266f681ab4c27f6aef458c10f33916b094218854429284d32fdb59aba8fae3caf8e4", | |
"TopicArn": "arn:aws:sns:us-east-1:374852340823:sns-to-apigw-demo-dev-Topic-1M7QN8DMGC30Z", | |
"Message": "You have chosen to subscribe to the topic arn:aws:sns:us-east-1:374852340823:sns-to-apigw-demo-dev-Topic-1M7QN8DMGC30Z.\nTo confirm the subscription, visit the SubscribeURL included in this message.", | |
"SubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=ConfirmSubscription&TopicArn=arn:aws:sns:us-east-1:374852340823:sns-to-apigw-demo-dev-Topic-1M7QN8DMGC30Z&Token=2336412f37fb687f5d51e6e241dbca52e8c2620f5aa61c0e44f2e34cdac05af6c8d340f1a2314eff0f5dc1ee0f2e949a2fd5aa4f97d5f3e3a428c654a1eb46b096f357977b59f0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Promise = require('bluebird') | |
const Log = require('@perform/lambda-powertools-logger') | |
module.exports = () => { | |
let isTimedOut = undefined | |
let promise = undefined | |
const resetPromise = () => { | |
if (promise) { | |
promise.cancel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service: sar-app-in-sls-demo | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
functions: | |
hello: | |
handler: handler.hello |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports.handler = co.wrap(function* (event, context, callback) { | |
let players = lib.genPlayers(); | |
let accept = event.headers.Accept || "application/json"; | |
switch (accept) { | |
case "application/x-protobuf": | |
let response = yield protoResponse(players, "functions/player.proto", "protodemo.Players"); | |
callback(null, response); | |
break; | |
case "application/json": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deploy: | |
image: node:latest | |
environment: | |
- HOME=/home | |
volumes: | |
- .:/src | |
- $HOME/.aws:/home/.aws | |
working_dir: /src | |
command: "./deploy.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
npm install --force | |
node_modules/.bin/sls deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const co = require('co'); | |
const Promise = require('bluebird'); | |
const protobuf = Promise.promisifyAll(require("protobufjs")); | |
const lib = require('./lib'); | |
const fs = require('fs'); | |
module.exports.handler = co.wrap(function* (event, context, callback) { | |
console.log(JSON.stringify(event)); |
NewerOlder