Created
October 23, 2016 18:43
-
-
Save yeehaa123/b4b915e6772c47e6031cb525f9dbecdf to your computer and use it in GitHub Desktop.
This file contains hidden or 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: offcourse-backend | |
provider: | |
name: aws | |
runtime: nodejs4.3 | |
iamRoleStatements: | |
- Effect: Allow | |
Action: | |
- dynamodb:GetItem | |
- dynamodb:BatchGetItem | |
- dynamodb:PutItem | |
- dynamodb:Scan | |
- s3:PutObject | |
- s3:GetObject | |
- kinesis:PutRecords | |
Resource: "*" | |
custom: | |
kinesisBase: arn:aws:kinesis:us-east-1:774182433398:stream | |
writeEnvVars: ${file(./envvars.yml):EnvVars} | |
plugins: | |
- serverless-plugin-write-env-vars | |
functions: | |
query: | |
handler: functions/index.query | |
events: | |
- http: | |
path: query | |
method: post | |
cors: true | |
command: | |
handler: functions/index.command | |
filter: | |
handler: functions/index.filter | |
events: | |
- stream: | |
arn: ${self:custom.kinesisBase}/bookmarks-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
extract: | |
handler: functions/index.extract | |
timeout: 20 | |
events: | |
- stream: | |
arn: ${self:custom.kinesisBase}/github-repos-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
- stream: | |
arn: ${self:custom.kinesisBase}/github-courses-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
authorize: | |
handler: functions/index.authorize | |
transform: | |
handler: functions/index.transform | |
events: | |
- stream: | |
arn: ${self:custom.kinesisBase}/embedly-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
- stream: | |
arn: ${self:custom.kinesisBase}/raw-courses-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
- stream: | |
arn: ${self:custom.kinesisBase}/saved-courses-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
split: | |
handler: functions/index.split | |
events: | |
- stream: | |
arn: arn:aws:dynamodb:us-east-1:774182433398:table/courses-dev/stream/2016-10-13T21:08:35.461 | |
batchSize: 1 | |
startingPosition: LATEST | |
dump: | |
handler: functions/index.dump | |
events: | |
- stream: | |
arn: ${self:custom.kinesisBase}/bookmarks-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
- stream: | |
arn: ${self:custom.kinesisBase}/embedly-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
debug: | |
handler: functions/index.debug | |
events: | |
- http: | |
path: debug | |
method: any | |
cors: true | |
integration: lambda | |
authorizer: authorize | |
- stream: | |
arn: ${self:custom.kinesisBase}/missing-resources-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
save: | |
handler: functions/index.save | |
events: | |
- stream: | |
arn: ${self:custom.kinesisBase}/resources-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
- stream: | |
arn: ${self:custom.kinesisBase}/processed-courses-${opt:stage} | |
batchSize: 1 | |
startingPosition: LATEST | |
index: | |
handler: functions/index.index | |
resources: | |
Resources: | |
AccessBucketsRole: ${file(./cloudformation/roles.yml):AccessBucketsRole} | |
BookmarksStream: ${file(./cloudformation/streams.yml):BookmarksStream} | |
ResourcesStream: ${file(./cloudformation/streams.yml):ResourcesStream} | |
EmbedlyStream: ${file(./cloudformation/streams.yml):EmbedlyStream} | |
GithubReposStream: ${file(./cloudformation/streams.yml):GithubReposStream} | |
GithubCoursesStream: ${file(./cloudformation/streams.yml):GithubCoursesStream} | |
RawCoursesStream: ${file(./cloudformation/streams.yml):RawCoursesStream} | |
ProcessedCoursesStream: ${file(./cloudformation/streams.yml):ProcessedCoursesStream} | |
SavedCoursesStream: ${file(./cloudformation/streams.yml):SavedCoursesStream} | |
MissingResourcesStream: ${file(./cloudformation/streams.yml):MissingResourcesStream} | |
ResourcesTable: ${file(./cloudformation/tables.yml):ResourcesTable} | |
UsersTable: ${file(./cloudformation/tables.yml):UsersTable} | |
CoursesTable: ${file(./cloudformation/tables.yml):CoursesTable} | |
BookmarksTable: ${file(./cloudformation/tables.yml):BookmarksTable} | |
IdentitiesTable: ${file(./cloudformation/tables.yml):IdentitiesTable} | |
Elasticsearch: ${file(./cloudformation/indexes.yml):Elasticsearch} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment