Created
August 4, 2020 02:50
-
-
Save rajanpanchal/75957770229cf61b58da4dd36de7aca8 to your computer and use it in GitHub Desktop.
Markdium-Sign Up
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
ApiGatewaySignupApi: | |
Type: AWS::Serverless::Api | |
Properties: | |
StageName: Prod | |
Auth: | |
UsagePlan: | |
CreateUsagePlan: PER_API | |
Description: Usage plan for this API | |
Quota: | |
Limit: 500 | |
Period: MONTH | |
Throttle: | |
BurstLimit: 100 | |
RateLimit: 50 | |
SignupFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
Environment: | |
Variables: | |
userTable: !Ref myDynamoDBTable | |
keyid: !Ref KmsKey | |
CodeUri: Lambda/ | |
Handler: signup.lambda_handler | |
Runtime: python3.8 | |
Policies: | |
- DynamoDBCrudPolicy: | |
TableName: !Ref myDynamoDBTable | |
- KMSEncryptPolicy: | |
KeyId: !Ref KmsKey | |
- KMSDecryptPolicy: | |
KeyId: !Ref KmsKey | |
Events: | |
getCounter: | |
Type: Api | |
Properties: | |
Path: /signup | |
Method: POST | |
RestApiId: !Ref ApiGatewaySignupApi | |
ApiGatewayLoginApi: | |
Type: AWS::Serverless::Api | |
Properties: | |
StageName: Prod | |
Auth: | |
UsagePlan: | |
CreateUsagePlan: PER_API | |
Description: Usage plan for this API | |
Quota: | |
Limit: 500 | |
Period: MONTH | |
Throttle: | |
BurstLimit: 100 | |
RateLimit: 50 | |
LoginFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
Environment: | |
Variables: | |
userTable: !Ref myDynamoDBTable | |
keyid: !Ref KmsKey | |
CodeUri: Lambda/ | |
Handler: login.lambda_handler | |
Runtime: python3.8 | |
Policies: | |
- DynamoDBCrudPolicy: | |
TableName: !Ref myDynamoDBTable | |
- KMSEncryptPolicy: | |
KeyId: !Ref KmsKey | |
- KMSDecryptPolicy: | |
KeyId: !Ref KmsKey | |
Events: | |
getCounter: | |
Type: Api | |
Properties: | |
Path: /login | |
Method: POST | |
RestApiId: !Ref ApiGatewayLoginApi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment