Build a Modern API with AWS
Nathaniel Beckstead
Build a Modern API with AWS Nathaniel Beckstead 2 S3 API Gateway - - PowerPoint PPT Presentation
Build a Modern API with AWS Nathaniel Beckstead 2 S3 API Gateway Lambda Dynamo DB scriptingis.life/glimpseid 3 $whoami Nathaniel Beckstead C L O U D D E V O P S C Y B E R scriptingis.life 4 Background Interned in KeyBank
Nathaniel Beckstead
2 API Gateway Lambda S3 Dynamo DB
scriptingis.life/glimpseid
Nathaniel Beckstead ▫ C L O U D ▫ D E V O P S ▫ C Y B E R scriptingis.life
3
Background
▫ Interned in KeyBank SOC ▫ Automated parts of phishing response ▫ URLScan.io
4
Background
5
6
7
HTTP Info
8
▫ Runs in a Docker container ▫ Selenium
▫ Browsermob Proxy
HTTP Info
9
Selenium
▫ Web browser automation primarily designed for testing ▫ Render a page and interact with elements
10
11 API Gateway Lambda S3 Dynamo DB
Serverless Computing
Lambda
▫ Serverless Computing ▫ Only charged for execution time and resources used ▫ Run when triggered by
13
Limitations
▫ Need to include all resources in upload
▫ Small compute power
▫ No root access
14
Lambda Cost
▫ 1,000,000 requests free ▫ 400,000 GB-seconds of compute resources free ▫ 800,000 seconds of runtime with 512MB memory
15
Lambda
▫ Python script with Selenium driving Chromium
16
21Buttons/pychromeless
Lambda
▫ Python script with Selenium driving Chromium
17
21Buttons/pychromeless
18
Lambda
▫ Lambda invokes a function in your code ▫ Parameters passed as a dictionary
19
Lambda Deployment
▫ Makefile ▫ AWS CLI
20
Simple Storage Service (S3) and DynamoDB
S3
▫ Key-Value Storage ▫ Host publicly accessible images ▫ Uploading done through boto Python module
22
S3 Cost
▫ Storage
▫ Access
23
DynamoDB
▫ NoSQL Database
▫ No setup, maintenance, or clustering ▫ Cost
24
REST API Development and Management
API Gateway
26
▫ Visual API development ▫ Proxy for other AWS services
▫ Convert between HTTP requests and Lambda execution
API Gateway
27
API Gateway Cost
▫ $3.50 per million API calls ▫ Caching
28
Frontend is hard :(
Github Pages
▫ Host a static site for free
30
Why Use The Cloud?
▫ Easy
▫ Cheap
▫ Scalable
32
Easy
33
Dashboards
34
Cheap
35
Next Up
▫ Continuous Integration ▫ Network Activity Logging ▫ Support Multiple Regions, User-Agents ▫ ...
36
scriptingis.life/glimpseid
37
Resources
▫ Boto 3 Documentation
▫ AWS Blog - Project Ideas! ▫ Open Guide to AWS ▫ Using Python on Lambda ▫ More on urlscan.io ▫ /r/aws
38