Developing On AWS Memo III
這篇紀錄Developing On AWS Memo III。
Day3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
| Monolith 單體
Side effect
Microservice 顆粒度要切到多細?
組織的架構決定系統的邊界
Domain-driven design 每一個功能都需要從Domain切入
Service <—— API ——> Service
Startup初期 不適合使用DDD cause 沒有完整人員配置(很花時間) + Domain通常會快速變化
Strangler 扼殺者
Anti-corrpt layer 避免交易失敗 會導回原本的服務 不適合用在state function
Facade pattern
Strangler design pattern -> Refactor
Step function by AWS many functions
Why need Amazon Cognito? Authentication + Authorization
JWT - Json Web Token
AK/SK - (Access Key ID/Secret Access Key)
——————————
User pool ID
ap-northeast-1_XKt5DSA1h
ARN
arn:aws:cognito-idp:ap-northeast-1:408847233856:userpool/ap-northeast-1_XKt5DSA1h
Client ID
PollyNotesWeb
7b8q9eokiutqaiopicagver0pg
{
"aud": "7b8q9eokiutqaiopicagver0pg",
"auth_time": "1664517043",
"cognito:username": "student",
"event_id": "777335cc-211e-4135-a0c7-52f30a2f726d",
"exp": "Fri Sep 30 06:50:43 UTC 2022",
"iat": "Fri Sep 30 05:50:43 UTC 2022",
"iss": "https://cognito-idp.ap-northeast-1.amazonaws.com/ap-northeast-1_XKt5DSA1h",
"jti": "7a6524c6-d31c-471b-a2cd-05a823eb8583",
"origin_jti": "da0835fd-4515-4fc4-953c-41b64c2a63d8",
"sub": "9cce2eae-0dcf-4299-bdf6-0765c6231938",
"token_use": "id"
}
———————————
DevOps - Development and operation culture
standardize
Infrastructure as code - IaC
observability - logging metrics tracing
EventBridge
@annotation == @director
避免Lambda looping是 不使用Lambda invoke 使用StepsFunction
用retry取代loop
|