Skip to content

Instantly share code, notes, and snippets.

@saikitanabe
Last active January 21, 2021 14:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saikitanabe/4c81fa458ca1665df575800bab3bb78d to your computer and use it in GitHub Desktop.
Save saikitanabe/4c81fa458ca1665df575800bab3bb78d to your computer and use it in GitHub Desktop.
Serverless AWS image resize architecture diagram - click raw and copy entire content to your clipboard before pasting it to Sketchboard.
{
"boardId": "dummy",
"items": [
{
"text": "**301**",
"elementType": "childtext",
"shape": "1910,3245,20,14",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-14",
"cd": "",
"crc": -1996502217,
"p": "131-13"
},
{
"text": "Image is resized,\nPermanent redirect to CloudFront\nhttps://abcd.cloudfront.net/profile_50.jpg",
"elementType": "childtext",
"shape": "2506,2815,178,47",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-41",
"cd": "",
"crc": 912042448,
"p": "131-13"
},
{
"text": "## 7.",
"elementType": "childtext",
"shape": "2754,2892,20,27",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "135-3",
"cd": "",
"crc": -459903946,
"p": "131-13"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2767,2947,2760,2901,2662,2853,2085,2964,1932,3173,1920,3324",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-13",
"cd": "131-8:131-3",
"crc": -639392857
},
{
"text": "",
"elementType": "aws_cloudfront",
"shape": "2398,3437,89,106",
"backgroundColor": "245,133,54,1:157,80,37,1",
"textColor": "51,51,51,1",
"props": 201,
"version": 7,
"id": 0,
"clientId": "131-15",
"cd": "",
"crc": 1685257653
},
{
"text": "## 1.",
"elementType": "childtext",
"shape": "2118,3451,20,27",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "132-1",
"cd": "",
"crc": 226023162,
"p": "131-16"
},
{
"text": "## 8.",
"elementType": "childtext",
"shape": "2118,3494,20,26",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "132-6",
"cd": "",
"crc": -857930138,
"p": "131-16"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2102,3487,2396,3485",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:44,178,0,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-16",
"cd": "131-3:131-15",
"crc": 2014008239
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2442,3545,2442,3755",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:44,178,0,1",
"textColor": "51,51,51,1",
"props": 3145728,
"version": 7,
"id": 0,
"clientId": "131-17",
"cd": "131-15:131-20",
"crc": 1492155622
},
{
"text": "",
"elementType": "aws_s3_bucket_objects",
"shape": "3017,3337,100,104",
"backgroundColor": "224,82,67,1:140,49,35,1",
"textColor": "51,51,51,1",
"props": 201,
"version": 7,
"id": 0,
"clientId": "131-18",
"cd": "",
"crc": -2133262083
},
{
"text": "Image\nin\ncache?",
"elementType": "choice",
"shape": "2383,3757,118,101",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 65921,
"version": 7,
"id": 0,
"clientId": "131-20",
"cd": "",
"crc": 1525882434
},
{
"text": "**Yes**",
"elementType": "childtext",
"shape": "2339,3784,20,14",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-22",
"cd": "",
"crc": 1281123476,
"p": "131-21"
},
{
"text": "serve image",
"elementType": "childtext",
"shape": "2001,3598,65,14",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-28",
"cd": "",
"crc": 144567169,
"p": "131-21"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2381,3808,1998,3545",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:44,178,0,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-21",
"cd": "131-20:131-3",
"crc": 505493833
},
{
"text": "**No**",
"elementType": "childtext",
"shape": "2522,3783,15,14",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-24",
"cd": "",
"crc": -2103311210,
"p": "131-23"
},
{
"text": "Get image from S3",
"elementType": "childtext",
"shape": "2829,3695,100,14",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-36",
"cd": "",
"crc": 1177233503,
"p": "131-23"
},
{
"text": "## 2.",
"elementType": "childtext",
"shape": "2558,3766,20,27",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "132-2",
"cd": "",
"crc": -537820843,
"p": "131-23"
},
{
"text": "## 9.",
"elementType": "childtext",
"shape": "2558,3816,20,26",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "132-8",
"cd": "",
"crc": -1252464082,
"p": "131-23"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2503,3807,3067,3443",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-23",
"cd": "131-20:131-18",
"crc": -1280533562
},
{
"text": "-->",
"elementType": "relationship",
"shape": "3015,3389,2808,3302",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-25",
"cd": "131-18:131-26",
"crc": -1950324934
},
{
"text": "Image\nexists?",
"elementType": "choice",
"shape": "2677,3261,129,83",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 65921,
"version": 7,
"id": 0,
"clientId": "131-26",
"cd": "",
"crc": -1387090960
},
{
"text": "<<s3>>\nRedirect Rule\n--\n404 => 307",
"elementType": "activity",
"shape": "2447,3120,122,89",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 385,
"version": 7,
"id": 0,
"clientId": "131-29",
"cd": "",
"crc": -1712597115
},
{
"text": "",
"elementType": "w-browser",
"shape": "1883,3326,217,217",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 65737,
"version": 7,
"id": 0,
"clientId": "131-3",
"cd": "",
"crc": -235661137
},
{
"text": "**307**",
"elementType": "childtext",
"shape": "2141,3349,20,13",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-42",
"cd": "",
"crc": -1103148802,
"p": "131-30"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2445,3164,2102,3374",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-30",
"cd": "131-29:131-3",
"crc": 29858188
},
{
"text": "**Yes**",
"elementType": "childtext",
"shape": "2715,3356,20,14",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-33",
"cd": "",
"crc": 750700626,
"p": "131-32"
},
{
"text": "Put image\nin CloudFront\ncache",
"elementType": "childtext",
"shape": "2543,3453,72,48",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-35",
"cd": "",
"crc": 987723577,
"p": "131-32"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2741,3346,2489,3490",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-32",
"cd": "131-26:131-15",
"crc": 1026631020
},
{
"text": "S3 bucket",
"elementType": "textitem",
"shape": "3091,3436,62,35",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "153,153,153,1",
"props": 65536,
"version": 7,
"id": 0,
"clientId": "131-37",
"cd": "",
"crc": -1308322609
},
{
"text": "Amazon CloudFront",
"elementType": "textitem",
"shape": "2466,3531,113,35",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "153,153,153,1",
"props": 65536,
"version": 7,
"id": 0,
"clientId": "131-38",
"cd": "",
"crc": -565952451
},
{
"text": "Amazon API Gateway",
"elementType": "textitem",
"shape": "2323,3056,134,35",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "153,153,153,1",
"props": 65664,
"version": 7,
"id": 0,
"clientId": "131-39",
"cd": "",
"crc": -586020179
},
{
"text": "404",
"elementType": "childtext",
"shape": "2594,3135,20,13",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-11",
"cd": "",
"crc": 1040777085,
"p": "131-4"
},
{
"text": "**No**",
"elementType": "childtext",
"shape": "2729,3228,15,14",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-27",
"cd": "",
"crc": -390948086,
"p": "131-4"
},
{
"text": "## 3.",
"elementType": "childtext",
"shape": "2690,3179,20,27",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "132-3",
"cd": "",
"crc": 1508983121,
"p": "131-4"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2742,3259,2571,3164",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-4",
"cd": "131-26:131-29",
"crc": -1712917151
},
{
"text": "AWS Lambda",
"elementType": "textitem",
"shape": "2700,3050,134,34",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "153,153,153,1",
"props": 65664,
"version": 7,
"id": 0,
"clientId": "131-40",
"cd": "",
"crc": 190333735
},
{
"text": "--",
"elementType": "relationship",
"shape": "2508,3211,2508,3276",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 7340032,
"version": 7,
"id": 0,
"clientId": "131-46",
"cd": "131-29:131-47",
"crc": 1975483408
},
{
"text": "Temporarily redirect to API Gateway\n\nhttps://abcd.execute-api.region.amazonaws.com",
"elementType": "textitem",
"shape": "2369,3278,278,59",
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 65536,
"version": 7,
"id": 0,
"clientId": "131-47",
"cd": "",
"crc": 1297445657
},
{
"text": "",
"elementType": "aws_gateway",
"shape": "2347,2956,86,104",
"backgroundColor": "217,167,65,1:135,105,41,1",
"textColor": "51,51,51,1",
"props": 201,
"version": 7,
"id": 0,
"clientId": "131-5",
"cd": "",
"crc": -2006851422
},
{
"text": "## 4.",
"elementType": "childtext",
"shape": "2012,3264,20,27",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "132-4",
"cd": "",
"crc": 974268587,
"p": "131-6"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2013,3324,2345,3008",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-6",
"cd": "131-3:131-5",
"crc": 277699977
},
{
"text": "Trigger resize image\nLambda function",
"elementType": "childtext",
"shape": "2513,2990,108,31",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-31",
"cd": "",
"crc": 2103545649,
"p": "131-7"
},
{
"text": "## 5.",
"elementType": "childtext",
"shape": "2463,2981,20,27",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "132-5",
"cd": "",
"crc": 960656236,
"p": "131-7"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2435,3009,2720,3002",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-7",
"cd": "131-5:131-8",
"crc": -163013473
},
{
"text": "",
"elementType": "aws_lambda",
"shape": "2722,2949,90,106",
"backgroundColor": "245,133,54,1:157,80,37,1",
"textColor": "51,51,51,1",
"props": 201,
"version": 7,
"id": 0,
"clientId": "131-8",
"cd": "",
"crc": -717165114
},
{
"text": "Put scaled image\non S3",
"elementType": "childtext",
"shape": "2965,3102,92,30",
"backgroundColor": "250,250,250,1:51,51,51,1",
"textColor": "51,51,51,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "131-12",
"cd": "",
"crc": 491743529,
"p": "131-9"
},
{
"text": "## 6.",
"elementType": "childtext",
"shape": "2847,2974,20,27",
"backgroundColor": "44,178,0,0.85:37,150,0,1",
"textColor": "255,255,255,1",
"props": 32,
"version": 7,
"id": 0,
"clientId": "135-2",
"cd": "",
"crc": 1108300060,
"p": "131-9"
},
{
"text": "-->",
"elementType": "relationship",
"shape": "2814,3002,3067,3335",
"ext": {
"lweight": 3
},
"backgroundColor": "204,204,255,0:51,51,51,1",
"textColor": "51,51,51,1",
"props": 1048576,
"version": 7,
"id": 0,
"clientId": "131-9",
"cd": "131-8:131-18",
"crc": -1159183429
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment