Python AWS Lambda Monorepo — Part 1: Project Setup

Jurassic Park (1993) | Universal Studios/Amblin

H‎‎‎‎‎‎old o‏‏n to your butts!‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‏‏‎‏‏‎ ‎

AWS

DynamoDB

Table creation parameters
The dinosaurs table after creation

Lambda

Lambda creation parameters
Lambda functions after creation

IAM

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject"
],
"Resource": "arn:aws:s3:::examplebucket/item-*"
}
]
}
Roles have Policies. Policies have Permission Statements.
Adding new permission to the policy JSON

create_dinosaur

{
"Effect": "Allow",
"Action": "dynamodb:PutItem",
"Resource": "arn:aws:dynamodb:region:account:table/dinosaurs"
},

create_hybrid_dinosaur

{
"Effect": "Allow",
"Action": [
"dynamodb:PutItem",
"dynamodb:Query",
"dynamodb:Scan"
],
"Resource": "arn:aws:dynamodb:region:account:table/dinosaurs"
},

fight_dinosaurs

{
"Effect": "Allow",
"Action": [
"dynamodb:Query",
"dynamodb:Scan"
],
"Resource": "arn:aws:dynamodb:region:account:table/dinosaurs"
},
CircleCI user creation parameters
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "lambda",
"Effect": "Allow",
"Action": "lambda:UpdateFunctionCode",
"Resource": [
"arn:aws:lambda:us-east-1:*:function:*"
]
}
]
}

CircleCI

Secret, secret, I’ve got a secret!

Co-founder and CTO of Hecdemi / Hyperion. Computer Engineer and entrepreneur from Puerto Rico 🇵🇷 Interested in combining tech, business, and product design.