ãå稿å·çã追ãè¾¼ã¿ã®çºã«ããã£ããã¨ããã°ããé ããã£ã¦ãã¾ãã@dkfjã§ããæè¿ãã¢ãã¤ã«ã¢ããªã«ã¤ãã¦èãããã¨ãå¤ãã®ã§ããããã®ä¸ã®ãã¼ãã®ï¼ã¤ãã·ã¹ãã ã®èªè¨¼èªå¯ã§ããå æ¥ãJAWSUGã®ã¢ã¼ããã¯ãã£æ¯é¨ã§ãããããã¼ãã«è°è«ãã¦ããã®ã§ä»æç¹ã®èª²é¡æèãæ´çãã¦ããã¾ãã
å½æ¥ã®è³æ
www.slideshare.net
説æãä½ãæ¸ãã¦ããªãã®ã§ãããã ãè¦ã¦ããã£ã±ã解ããªãã¨æãã¾ããé ã追ã£ã¦ã説æãã¾ãã
èªè¨¼ã¨èªå¯
ãã¾ãèªè¨¼ã¨èªå¯ã®éãã§ããèªè¨¼ã¯æ¬äººæ§ã®ç¢ºèªã§ãããèªå¯ã¯ãªã½ã¼ã¹ã«å¯¾ããå©ç¨æ¨©éã®ä»ä¸ã§ããå¤ãã®ã·ã¹ãã ã§ã¯ãèªè¨¼ã¨åæã«èªå¯ãè¡ãã¾ãããæ¬è³ªçã«ã¯å¥ã
ã®æ©è½ã§ãããã¨ãã話ã§ãããã¡ãããï¼ã¤ã®ã·ã¹ãã ã®ä¸ã§åæã«å®ç¾ãããã¨ã®åé¡ãããã¾ããã
Cognitoãå©ç¨ããèªè¨¼ã¨èªå¯
ãAWSã«ã¯ãèªè¨¼ã¨èªå¯ã®é¨åãç°¡åã«ã§ãããµã¼ãã¹ã¨ãã¦Cognitoãããã¾ããèªè¨¼ãããã¤ãã¨ãã¦ã¯ãFacebookãTwitterãªã©å¤é¨ã®èªè¨¼å±ãå©ç¨ã§ãã¾ããOpenID Connectãã¼ã¹ã®ç¬èªã®èªè¨¼å±ãç«ã¦ããã¨ããDynamoDBãå©ç¨ãããã¨ãåºæ¥ã¾ããCognitoã®ç¹å¾´ã¨ãã¦ã¯ãèªè¨¼ï¼æªèªè¨¼ããããã«æ¨©éãä¸ãããã¨ãã§ãããã¨ã§ããæªèªè¨¼ã¦ã¼ã¶ã«ã¯åç §æ¨©éãèªè¨¼ã¦ã¼ã¶ã«ã¯æ¸ãè¾¼ã¿æ¨©éãä¸ããã¨ãã£ãã¦ã¼ã¹ã±ã¼ã¹ãèãããã¾ããã
Cognitoãå©ç¨ããèªè¨¼ã¨èªå¯ãã®ï¼
ãCognitoã®ããããã®å½¹å²ãåå²ãã¦èª¬æãã¦ãã¾ããä¸æçãªå©ç¨æ¨©éã®ä»ä¸ãèã¨ãªãã¾ããã¾ããIAMã®è¨å®ã§ãã©ã®ãªã½ã¼ã¹ãå©ç¨å¯è½ããå¶éã§ãã¾ãã
AWSã®èªå¯ã¨ã¢ããªã±ã¼ã·ã§ã³ãå¿ è¦ã¨ããèªå¯
ããã®ãã¼ã¸ããä»åã®ä¸çªã®ãã¼ãã§ããAWSã®èªå¯ã¨ã¢ããªã±ã¼ã·ã§ã³ãå¿
è¦ã¨ããèªå¯ã¯éãããã¨è¨ããã¨ã§ããCognitoçã§ãDynamoDBã«å¯¾ããåç
§æ¨©éãä¸ããã¨ããã¨ãæ°ãä»ããªãã¨ãã®èªå¯ã®ç¯å²ãåºããªããã¡ã§ããä¾ãã°ãã¦ã¼ã¶ã¼ãã¼ã¿ãDynamoDBã«å
¥ãã¦ããã¨ããããã¦ã¼ã¶ã«ä¸ãã¦ãã権éã¨ãã¦ã¯ãèªåã®ãã¼ã¿ã«é¢ããé¨åã§ããç¹ã«2-Tieræ§æã®å ´åãã¢ããªå´ã§ãã¼ã¿ã®çµè¾¼ãããã®ã§ç¹ã«æ³¨æãå¿
è¦ã§ãã
ãã¡ãªã¿ã«ã¦ã¼ã¶ã¼ãã¼ã¿ã«çµã£ã¦ããã°ãCognitoã«ã¯Cognito Syncã¨ããæ©è½ãããã¾ãããã¡ãã®æ¹ã«æ ¼ç´ããã®ãï¼ã¤ã®è§£ã§ãããã ããã¤ã¡ã¼ã¸çã«ã¯ã¦ã¼ã¶ã¼ãã¨ã«SQLiteã®ãã¼ã«ã«ãã¼ã¿ãã¼ã¹ãæã¤ãããªã¤ã¡ã¼ã¸ãªã®ã§ãã·ã¹ãã ã®ç®¡çå´ã§ã¦ã¼ã¶ã¼ãã¼ã¿ãã³ã³ããã¼ã«ããã¨ãã£ãå ´åã«ã¯ä½¿ãã¾ããã
èªå¯ã®ã³ã³ããã¼ã«ä¾
ãèªå¯ã®ã³ã³ããã¼ã«ä¾ã®ï¼ã¤ç®ã¨ãã¦ã¯ããã®è¾ºãã®å¦çãLambdaã«ããããè¯ãã§ãããã¨ãããã¿ã¼ã³ã§ããå³ã§ã¯ãAPI Gatewayãä»ãã¦ãã¾ãããAPI Gatewayãªãã§ç´æ¥Lambdaã®2-Tierã§ãåé¡ããã¾ããã
èªå¯ã®ã³ã³ããã¼ã«ä¾ããã®ï¼
ãäºã¤ç®ã¯ãAPI Gatewayã®å©ç¨èªä½ãèªè¨¼æ¸ã¿ã®ã¦ã¼ã¶ã«çµãã¨ããæ¹æ³ãããã¨ããä¾ã§ããAPIã®å©ç¨ã¦ã¼ã¶ã®èªè¨¼ä»£ããã«APIãã¼ã使ããã¨ããå ´åãããã¾ããAPIãã¼ã¯ãèªè¨¼ä»£ããã«ä½¿ã£ã¦ã¯é§ç®ã§ããä¾ãã°ã¢ãã¤ã«ã®å ´åãAPIãã¼ãã¢ããªã«åãè¾¼ãã§é å¸ãããã¨ã«ãªãã®ã§ãã¢ããªã¢ã¸ã¥ã¼ã«ããAPIãã¼ã¯æ½åºå¯è½ã§ããã¨ãããã¨ã§ãã¡ããã¨ããå ´åã¯Cognito使ãã®ãè¯ãã§ããã
èªå¯ã®ã³ã³ããã¼ã«ä¾ããã®3
ãæå¾ã®ä¾ã¨ãã¦ã¯ãLambdaå´ã§Cognitoãå©ç¨ããä¾ã§ããããã®ä¾ã§ã¯ãCognitoã使ã£ã¦ãã¾ãããIAMã¨AssumeRoleãçµã¿åããããã¨ã§ãããç´°ããå¶å¾¡ãã§ãã¾ããã¾ãIAM Roleã®å¶éæ°ããå¤ãIAM Userã使ãã¨ãããã¨ãèãããã¾ãããã以å¤ã«ããAWSã¨é¢ãã¦ãLambdaãADãLDAPãªã©ã®ã¦ã¼ã¶ã¹ãã¢ã¨ä¼è©±ãããã°è²ã ãªãã¨ãåºæ¥ãããã¨è©±ãã¦ãã¾ããã
ãããã§IAMã使ãã¨AWSã®å¶éãã·ã¹ãã ã®å¶éã«ãªã£ã¦ãã¾ãã®ã§ãå人çã«ã¯é¿ããããªã¨æã£ã¦ãã¾ããã±ã¼ã¹ãã¤ã±ã¼ã¹ã§ããã
ç¾æç¹ã§ã®èª²é¡
ãèªè¨¼ã¨èªå¯ã«ã¤ãã¦ã¯ãèããã°èããç¨ã«å¥¥ãæ·±ãã§ããå ±éã®ãã¼ã¿ãè¦ãå ´åã¯ãã·ã³ãã«ãªèªå¯ã§å åã§ããæ©å¾®ãªæ å ±ã®å ´åã¯ãããå°ãå³å¯ã«ã³ã³ããã¼ã«ããå¿ è¦ãããã¾ãããã ããã¾ãç´°ãããã¨ããããã¨ããã¨ãããããLambdaã§ã¯ãªãæ¢åã®èªè¨¼ãã¬ã¼ã ã¯ã¼ã¯ã使ãã»ãã楽ã ããã¨ãªãã¾ããä»å¾ããããã£ãé¨åã«å¯¾å¿ããAWSã®ãµã¼ãã¹ãããµã¼ããã¼ãã£è£½ã®ãã¬ã¼ã ã¯ã¼ã¯ãåºã¦ããã®ã§ã¯ãªãããªã¨ä»åæ¬é¡ã§èãã¦ãã¾ãã