Lambda AWS code and configuration for Tableta Inmultirii
The code for AWS Lambda and role definition were extracted using utilities in raducrs/aws-lambda-save-configuration
This AWS lambda function were published also to serve as examples in creating a serveless architecture in AWS
- api\TI-AUser-ConfirmationGet - by key
- api\TI-AUser-DonationPost - with optimistic atomic increment (val = val + 1)
- api\TI-DUser-PostDonations - with optimistic atomic increment (val = val + 1)
- api\TI-PUser-StatusPut - chained from query result
- api\TI-DUser-GetDonations - secondary index with equality
- api\TI-PUser-AcceptedGet - between attribute for sort key and equality for key secondary index
- api\TI-PUser-AcceptedPost - sort key and equality for key
- api\TI-PUser-TargetedGet - composed key and read in batch
- api\TI-PUser-AcceptedPost - batch DeleteRequest delete by key and sort key
- async\TI-LocationPopulate - write batched data
- api\TI-PUser-DonationDelete - by key and sort key
- api\TI-PUser-LocationGet - from async processing of query (partial) results in batch (simulates a join)
- api\TI-Stats-GadgetsGet
- async\TI-SlackAlert - INSERT
- async\TI-SlackAlert - MODIFY
- async\TI-SlackAlert -
PostAuthentication_Authentication
- async\TI-SlackAlert -
PreSignUp_SignUp
- async\TI-SlackAlert -
PostConfirmation_ConfirmSignUp
- imageprocessing\TI-ImageChalk - resize
- imageprocessing\TI-ImageChalk - apply filters
- imageprocessing\TI-ImageChalk - pad to fit a given image ratio - userful for Facebook preview which requires 1:1.91 ratio
For the description of the policies you need to check the Cloud Formation Repo and the created resources. The S3
and DynamoDB
policies are created and attached via templates.
Allows API Gateway to read S3 content
AmazonAPIGatewayPushToCloudWatchLogs
TI-S3PublicAddJSON-Policy
apigateway.amazonaws.com
Retrieves an upload url into the bucket
AWSOpsWorksCloudWatchLogs
TI-UploadToPrivateFolder-Policy
lambda.amazonaws.com
Allows Lambda functions to call AWS services on your behalf.
AWSOpsWorksCloudWatchLogs
TI-WriteToPublicS3
TI-GetLayerChalkBoard-Policy
TI-ReadUploadImages-Policy
lambda.amazonaws.com
Allows Lambda functions to read DynamoDB tables
AWSOpsWorksCloudWatchLogs
TI-DynamoDBRead-Policy
TI-InvokeLambda-Policy
lambda.amazonaws.com
Allows Lambda functions to write and read to/from DynamoDB
AWSOpsWorksCloudWatchLogs
TI-SESCreateUpdateSend
TI-DynamoDBRead-Policy
TI-DynamoDBWrite-Policy
lambda.amazonaws.com
Allows Lambda functions to write to DynamoDB
AWSOpsWorksCloudWatchLogs
TI-DynamoDBWrite-Policy
TI-InvokeLambda-Policy
lambda.amazonaws.com
Allow post to slack
TI-DynamoDB-TargetedDonationsStream-Policy
lambda.amazonaws.com