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
from dataclasses import dataclass | |
from dataclasses_json import dataclass_json, Undefined | |
from dataclasses_json.undefined import UndefinedParameterError | |
from dataclasses_jsonschema import JsonSchemaMixin | |
from typing import Optional | |
@dataclass_json(undefined=Undefined.RAISE) | |
@dataclass | |
class Info(JsonSchemaMixin): | |
conf_one: float |
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
Resources: | |
Type: AWS::Serverless::Function | |
Properties: | |
Events: | |
RunHourly: | |
Type: Schedule | |
Properties: | |
Schedule: rate(10 minutes) |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: CORS example | |
Resources: | |
S3Bucket: | |
Type: "AWS::S3::Bucket" | |
Properties: | |
CorsConfiguration: | |
CorsRules: |
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
from nicHelper.wrappers import add_method | |
from lambdasdk.lambdasdk import Lambda | |
from awsSchema.apigateway import Event, Response | |
from nicHelper.dictUtil import printDict | |
from nicHelper.exception import errorString | |
# Cell | |
class AuthSdk: | |
def __init__( | |
self, |
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
MainDatabase: | |
Type: AWS::DynamoDB::Table | |
Properties: | |
AttributeDefinitions: | |
- AttributeName: ib_prcode | |
AttributeType: S | |
- AttributeName: needUpdate | |
AttributeType: S | |
BillingMode: PAY_PER_REQUEST | |
GlobalSecondaryIndexes: |
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
class Cognito: | |
'''sdk to interact with cognito as a client''' | |
def __init__( | |
self, | |
identityPoolId, | |
userPoolId, | |
accountId, | |
clientId, | |
clientSecret, | |
region = 'ap-southeast-1' |
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
#export | |
from functools import wraps # This convenience func preserves name and docstring | |
def add_method(cls): | |
def decorator(func): | |
@wraps(func) | |
def wrapper(self, *args, **kwargs): | |
return func(self, *args, **kwargs) | |
setattr(cls, func.__name__, wrapper) |
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
aws s3api \ | |
--profile villaaws \ | |
put-bucket-accelerate-configuration \ | |
--bucket chatterbot-data \ | |
--accelerate-configuration Status=Enabled |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from villaWalletDatabase.database import getMember, setMember, addMember, removeMember, test |