-
-
Save theburningmonk/88f50d37eac03b4e5a55b420975ab00e to your computer and use it in GitHub Desktop.
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: thundra-chaos | |
provider: | |
name: aws | |
runtime: python3.6 | |
timeout: 6 | |
iamRoleStatements: | |
- Effect: Allow | |
Action: | |
- dynamodb:* | |
Resource: | |
- Fn::GetAtt: [UsersTable, Arn] | |
- Fn::GetAtt: [UserPreferencesTable, Arn] | |
environment: | |
thundra_apiKey: <enter-your-key-here> | |
functions: | |
add-user: | |
handler: handler.addUser | |
events: | |
- http: | |
path: /user | |
method: post | |
get-user-preference: | |
handler: handler.getUserPreference | |
events: | |
- http: | |
path: /user/{userId}/pref | |
method: get | |
# you can add CloudFormation resource templates here | |
resources: | |
Resources: | |
UsersTable: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
TableName: users | |
BillingMode: PAY_PER_REQUEST | |
AttributeDefinitions: | |
- AttributeName: Id | |
AttributeType: S | |
KeySchema: | |
- AttributeName: Id | |
KeyType: HASH | |
UserPreferencesTable: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
TableName: user_preferences | |
BillingMode: PAY_PER_REQUEST | |
AttributeDefinitions: | |
- AttributeName: Id | |
AttributeType: S | |
KeySchema: | |
- AttributeName: Id | |
KeyType: HASH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment