Last active
December 19, 2017 18:26
-
-
Save dzimine/79545222f4a4aa1c21e0424fa9d375b1 to your computer and use it in GitHub Desktop.
Part of tutorial: https://medium.com/@dzimine/tutorial-building-a-community-on-boarding-app-with-serverless-stepfunctions-and-stackstorm-b2f7cf2cc419
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: signup-stormless | |
provider: | |
name: aws | |
runtime: python2.7 | |
timeout: 12 | |
memorySize: 128 | |
environment: | |
DYNAMODB_TABLE: ${self:service}-${opt:stage, self:provider.stage} | |
iamRoleStatements: | |
- Effect: Allow | |
Action: [dynamodb:Query, dynamodb:Scan, dynamodb:GetItem, dynamodb:PutItem, dynamodb:UpdateItem, dynamodb:DeleteItem] | |
Resource: "arn:aws:dynamodb:${opt:region, self:provider.region}:*:table/${self:provider.environment.DYNAMODB_TABLE}" | |
functions: | |
InviteSlack: | |
stackstorm: | |
action: slack.users.admin.invite | |
input: | |
email: "{{ input.body.email }}" | |
first_name: "{{ input.body.first_name }}" | |
config: | |
admin: ${file(env.yml):slack} | |
output: | |
statusCode: 200 | |
body: "{{ output }}" | |
RecordAC: | |
stackstorm: | |
action: activecampaign.contact_add | |
input: | |
email: "{{ input.body.email }}" | |
first_name: "{{ input.body.first_name }}" | |
last_name: "{{ input.body.last_name }}" | |
config: ${file(env.yml):active_campaign} | |
RecordDB: | |
handler: record_db/handler.endpoint | |
resources: | |
Resources: | |
UsersDynamoDbTable: | |
Type: 'AWS::DynamoDB::Table' | |
DeletionPolicy: Retain | |
Properties: | |
AttributeDefinitions: | |
- | |
AttributeName: email | |
AttributeType: S | |
KeySchema: | |
- | |
AttributeName: email | |
KeyType: HASH | |
ProvisionedThroughput: | |
ReadCapacityUnits: 1 | |
WriteCapacityUnits: 1 | |
TableName: ${self:provider.environment.DYNAMODB_TABLE} | |
plugins: | |
- serverless-plugin-stackstorm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment