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
import json | |
from urllib.parse import parse_qs | |
import urllib.parse | |
import boto3 | |
import logging | |
import os | |
import base64 | |
log = logging.getLogger() | |
log.setLevel(logging.INFO) |
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
Login | |
username: | |
password: | |
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
Sign Up | |
Username: | |
Password: | |
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
import json | |
from urllib.parse import parse_qs | |
import urllib.parse | |
import boto3 | |
import secrets | |
import logging | |
import os | |
import base64 | |
log = logging.getLogger() |
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
myDynamoDBTable: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
BillingMode: PAY_PER_REQUEST | |
AttributeDefinitions: | |
- | |
AttributeName: "userid" | |
AttributeType: "S" | |
KeySchema: |
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
Outputs: | |
ApiGatewaySignupApi: | |
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | |
Value: !Sub "https://${ApiGatewaySignupApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/signup/" | |
SignupFunction: | |
Description: "Sign Up Lambda Function ARN" | |
Value: !GetAtt SignupFunction.Arn | |
ApiGatewayLoginApi: | |
Description: "API Gateway endpoint URL for Prod stage for Hello World function" | |
Value: !Sub "https://${ApiGatewayLoginApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/login/" |
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
Parameters: | |
KeyAdmin: | |
Type: String | |
KeyUser: | |
Type: String |
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
KmsKey: | |
Type: AWS::KMS::Key | |
Properties: | |
Description: CMK for encrypting and decrypting | |
KeyPolicy: | |
Version: '2012-10-17' | |
Id: key-default-1 | |
Statement: | |
- Sid: Enable IAM User Permissions | |
Effect: Allow |
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
ApiGatewaySignupApi: | |
Type: AWS::Serverless::Api | |
Properties: | |
StageName: Prod | |
Auth: | |
UsagePlan: | |
CreateUsagePlan: PER_API | |
Description: Usage plan for this API | |
Quota: | |
Limit: 500 |