Last active
June 30, 2020 21:38
-
-
Save thanakijwanavit/24256b5483f6a31c2b937287124291f2 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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Transform: AWS::Serverless-2016-10-31 | |
| Description: > | |
| villa-wallet-sam | |
| Sample SAM Template for villa-wallet-sam | |
| Metadata: | |
| AWS::ServerlessRepo::Application: | |
| Name: wallet-database-app | |
| Description: for storing sensitive customer information | |
| Author: nicWanavit | |
| SpdxLicenseId: Apache-2.0 | |
| Labels: ['tests'] | |
| HomePageUrl: https://github.com/thanakijwanavit/villaMaster/tree/master/villa-master-dev/inv | |
| SemanticVersion: 0.0.8 | |
| SourceCodeUrl: https://github.com/thanakijwanavit/villaMaster/tree/master/villa-master-dev/inv | |
| Globals: | |
| Function: | |
| Timeout: 3 | |
| Environment: | |
| Variables: | |
| MY_ACCESS_KEY_ID: '' | |
| MY_SECRET_ACCESS_KEY: '' | |
| STACK_NAME: !Ref 'AWS::StackName' | |
| TABLE_NAME: !Join [ "-" , ["member", "database", !Ref BRANCH]] | |
| LOG_TABLE: !Join [ "-" , ["member", "database-log", !Ref BRANCH]] | |
| Parameters: | |
| BRANCH: | |
| Type: String | |
| Default: dev-blank | |
| Resources: | |
| getMember: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| CodeUri: getSetData | |
| Handler: app.getMember | |
| Runtime: python3.8 | |
| FunctionName: !Join [ "-" , [ !Ref 'AWS::StackName', "get-member"]] | |
| setMember: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| CodeUri: getSetData | |
| Handler: app.setMember | |
| Runtime: python3.8 | |
| FunctionName: !Join [ "-" , [ !Ref 'AWS::StackName', "set-member"]] | |
| addMember: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| CodeUri: getSetData | |
| Handler: app.addMember | |
| Runtime: python3.8 | |
| FunctionName: !Join [ "-" , [ !Ref 'AWS::StackName', "add-member"]] | |
| removeMember: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| CodeUri: getSetData | |
| Handler: app.removeMember | |
| Runtime: python3.8 | |
| FunctionName: !Join [ "-" , [ !Ref 'AWS::StackName', "add-member"]] | |
| test: | |
| Type: AWS::Serverless::Function | |
| Properties: | |
| CodeUri: getSetData | |
| Handler: app.test | |
| Runtime: python3.8 | |
| FunctionName: !Join [ "-" , [ !Ref 'AWS::StackName', "test-member"]] | |
| MemberDatabase: | |
| Type: AWS::DynamoDB::Table | |
| Properties: | |
| AttributeDefinitions: | |
| - AttributeName: hashedPhone | |
| AttributeType: S | |
| - AttributeName: memberId | |
| AttributeType: S | |
| BillingMode: PAY_PER_REQUEST | |
| KeySchema: | |
| - AttributeName: hashedPhone | |
| KeyType: HASH | |
| - AttributeName: memberId | |
| KeyType: RANGE | |
| PointInTimeRecoverySpecification: | |
| PointInTimeRecoveryEnabled: true | |
| TableName: !Join [ "-" , ["member", "database", !Ref BRANCH]] | |
| MemberDatabaseLogs: | |
| Type: AWS::DynamoDB::Table | |
| Properties: | |
| AttributeDefinitions: | |
| - AttributeName: logType | |
| AttributeType: S | |
| - AttributeName: timeStamp | |
| AttributeType: N | |
| BillingMode: PAY_PER_REQUEST | |
| KeySchema: | |
| - AttributeName: logType | |
| KeyType: HASH | |
| - AttributeName: timeStamp | |
| KeyType: RANGE | |
| TableName: !Join [ "-" , ["member", "database-log", !Ref BRANCH]] | |
| Outputs: | |
| test: | |
| Description: "hello world function" | |
| Value: !GetAtt test.Arn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment