ããã«ã¡ã¯ã
é·éçã®çå²³ã«ç»ã£ãã¨ããã親åã®é·é³¥ã«åºããããå±±æ¬ã§ããã¨ã¦ãå¯æãã£ãã§ãã
Amazon MWAA (Amazon Managed Workflows for Apache Airflow) ã®ãããã¯ã¼ã¯æ§æã¨æéã®æ¦ç®ã
Amazon MWAA ã®æ¤è¨¼ããã¦ãã¾ãã
Amazon MWAA ã®ãããã¯ã¼ã¯æ§æãããã¤ãããããã«è¦ãããããæ´çãå
¼ãã¦æ¬è¨äºãå·çãã¦ãã¾ãã
ãã®è¨äºãèªãã¨ãAmazon MWAAã®ãããã¯ã¼ã¯æ§æãæ´ããä¸ã§ãMWAAã®ãµã¼ãã¹ç»é¢ããç°å¢ãä½ããããã«ãªãã¾ãã
ãã®è¨äºã«æ¸ããã¨
æ¸ããã¨
- Amazon MWAA ã®ç°å¢ãä½æããéã®èæ ®ç¹ã主ã«ãããã¯ã¼ã¯å¨ãã
- Amazon MWAA ã®ç°å¢ãç¶æããããã®æéã
æ¸ããªããã¨
- Amazon MWAA ãç¨ããã¸ã§ãã®å®è¡æ¹æ³ãä»ã®è¨äºã§è§¦ããäºå®ã
Amazon MWAA ã®ã¢ã¼ããã¯ãã£
å ¬å¼ããã¥ã¡ã³ããè¦ãã¨ãAmazon MWAA ã¯ä»¥ä¸ã®ã¢ã¼ããã¯ãã£ã«ãªãããã§ãã
ãããã¯ã¼ã¯æ§æ
ãããã¯ã¼ã¯æ§æã«çç®ããã¨ãVPCã2ã¤ããã左㫠ãCustomer VPCããå³ã« ãService VPCã ãããã¾ãã
両è
ã®ç¸éç¹ã¯ã以ä¸ã®è¡¨ã®éãã«ãªãããã§ãã
VPCã®ç¨®é¡ | 説æ |
---|---|
Customer VPC | Amazon MWAA ãä½æããã¨ãã«å©ç¨è ãæå®ããVPCã§ãå©ç¨è ãä½æã»ç®¡çãã¾ãã |
Service VPC | Amazon管çã®VPCã§ãå©ç¨è ããã¯è¦ãã¾ããã |
ãåèï¼Amazon MWAA ã®ä½ææã« Customer VPCãé¸æããç»é¢
Amazon MWAA ã®WEB管çç»é¢ãåç §ããããã®éä¿¡çµè·¯
Amazon MWAA ã®WEB管çç»é¢ãåç
§ããããã®éä¿¡çµè·¯ã確èªãã¾ãã
Amazon MWAA ã®WEB管çç»é¢ãåç
§ããã«ã¯ããService VPCãã«ãã ãAirflow Web Serverãã«ã¦ã§ããã©ã¦ã¶ããæ¥ç¶ãã¾ãã
å³ã®è©²å½ç®æï¼
Amazon MWAA ãä½æããã¨ãã«ãããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã¨ããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ã¹ã¾ãã
å³ã®å³å´ãããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããå·¦å´ãããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ãã æã®éä¿¡çµè·¯ã§ãã
以ä¸ã«ããããã®èª¬æãè¨è¼ãã¾ãã
ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ã | 説æ |
---|---|
ãããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ã | ãAirflow Web Serverã ã«ã¤ã³ã¿ã¼ãããããæ¥ç¶å¯è½ãª VPC ã¨ã³ããã¤ã³ããä½æãã¾ããç¹å®ã®ãããªãã¯IPã¢ãã¬ã¹ããã®æ¥ç¶ã®ã¿è¨±å¯ãããã¨ã¯ã§ããªãããã§ããã¢ã¤ã³ã³ãALBã«ãªã£ã¦ããçç±ã¯ä»ã®ã¨ããä¸æã§ããããããããã¥ã¡ã³ãã®èª¤è¨ã§ãVPCã¨ã³ããã¤ã³ãã§ã¯ãªããALBãªã®ã§ãããã |
ãã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ã | ãAirflow Web Serverã ã«ãCustomer VPCãããæ¥ç¶å¯è½ãª VPC ã¨ã³ããã¤ã³ããä½æãã¾ãã |
å ¬å¼ããã¥ã¡ã³ãã®è©²å½ç®æãå訳ã
ãããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãã§ã¯ãã¤ã³ã¿ã¼ãããçµç±ã§ã¢ã¯ã»ã¹å¯è½ãª ãAirflow Web Serverãã®VPCã¨ã³ããã¤ã³ããæä¾ãã¾ãã
ãã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãã¯ãå©ç¨è ã管çãããCustomer VPCãããã¢ã¯ã»ã¹å¯è½ãªãAirflow Web Serverãã®VPCã¨ã³ããã¤ã³ããæä¾ãã¾ãã
ã©ã¡ãã®å ´åããApache Airflowã¦ã¼ã¶ã¼ã®ã¢ã¯ã»ã¹ã¯ãAWS Identity and Access Managementï¼IAMï¼ã§å®ç¾©ããã¢ã¯ã»ã¹ã³ã³ããã¼ã«ããªã·ã¼ã¨AWSSSOã«ãã£ã¦å¶å¾¡ããã¾ãã
Airflow Web Server ã® VPCã¨ã³ããã¤ã³ã
ããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã§ä½æãã¦ã¿ãã¨ããã以ä¸ã®VPCã¨ã³ããã¤ã³ãï¼(Airflow UI)ãåºæ¥ã¾ããããããããVPCã¨ã³ããã¤ã³ããã¨ããã®ã¯ããã¥ã¡ã³ãã®èª¤è¨ã§ãçè ãDNSã®éå¼ãçãè¡ãªã£ã¦ç¢ºèªããã¨ãããå®æ ã¯ALBã ã¨æããã¾ãã
- xxxxxxxx.c3.ap-northeast-1.airflow.amazonaws.com
ããã¸ã¡ã³ãã³ã³ã½ã¼ã«ã§ã®ç¢ºèªç®æï¼
ããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã§ä½æãã¦ã¿ãã¨ããã以ä¸ã®VPCã¨ã³ããã¤ã³ã(Airflow UI)ãåºæ¥ã¾ããã ãCustomer VPCãå ããæ¥ç¶å¯è½ã«ãªã£ã¦ãã¾ããã
- vpce-yyyyyyyyyy-yyyyyyyyyy.vpce-svc-xxxxxxxxxx.ap-northeast-1.vpce.amazonaws.com
WEBã¢ã¯ã»ã¹ãã¼ã¯ã³ãçºè¡ãã¦æ¥ç¶ãã¦ã¿ãã¨ä»¥ä¸ã®ãããªç»é¢ã«ãªãã¾ããWEBã¢ã¯ã»ã¹ãã¼ã¯ã³ã®çºè¡æ¹æ³ã¯å¾è¿°ãã¾ãã
ãCustomer VPCãã®ãããã¯ã¼ã¯æ§æ
ãCustomer VPCãã¯ãAmazon MWAA ãä½æããã¨ãã«å©ç¨è
ãæå®ããVPCã§ãå©ç¨è
ãä½æã»ç®¡çãã¾ãã
ãCustomer VPCãã«ã¯ Amazon MWAA ã®ãµã¼ãã¹ããApache Airflow Schedulers 㨠Airflow Worker(s) ã® Fargate ã³ã³ãããé
ç½®ãã¾ãã
å©ç¨è
ããã¯ããããã®Fargateã³ã³ãã群ã¯è¦ãã¾ããã
å³ã®è©²å½ç®æï¼
Apache Airflow Schedulers 㨠Airflow Worker(s)ã® Fargate ã³ã³ãã群ã¯ã以ä¸ã®AWSãµã¼ãã¹ã¨éä¿¡ãã¾ãã
- Amazon CloudWatch
- Amazon S3
- Amazon SQS
- Amazon ECR
- AWS KMS
- Amazon MWAA (èªèº«ã®ãµã¼ãã¹ã¨ã³ããã¤ã³ã)
ä¸è¿°ã®AWSãµã¼ãã¹ã¨éä¿¡ããããã«ãåAWSãµã¼ãã¹ç¨ã®VPCã¨ã³ããã¤ã³ããã¾ãã¯NATã²ã¼ãã¦ã§ã¤ãVPCå
ã«ä½æããå¿
è¦ãããã¾ãã
ã¾ãããService VPCãã«ãã Meta Database ã«ããService VPCãã®æä¾ããVPCã¨ã³ããã¤ã³ãã使ç¨ãã¦éä¿¡ãã¾ãããã®éä¿¡ã¯å©ç¨è
ãæèããå¿
è¦ã¯ããã¾ããã
å³ã®è©²å½ç®æï¼
ãCustomer VPCãã1ããèªåã§ä½æããéã®æ³¨æç¹ã¾ã¨ã
å©ç¨è
ãä½æã»ç®¡çãããCustomer VPCããä½æããéã«ã¯ãããã¤ãã®å¶ç´ãããã¾ãã
Create the VPC networkã«ã¯ãCustomer VPCãä½æç¨ã®CloudFormationãããã¾ãããã®ããããã®å
¬å¼ããã¥ã¡ã³ãã«ãã CloudFormation ãæµç¨ãã¦ä½æããã¨è¯ãããã§ãã
å©ç¨è
ãèªåã§ä½æãããã¨ãèãããã¾ãã®ã§ãä¸ã«å¶ç´ãã¾ã¨ãã¾ãã
ããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ã¶æ
- VPCã®ãDNSãã¹ãåãã¨ãDNSã解決ãæå¹ã«ãªã£ã¦ãããã¨ã
- ãã©ã¤ãã¼ããµããããã2ã¤ãç°ãªãã¢ãã¤ã©ããªãã£ã¾ã¼ã³ã«é ç½®ãã¦ãããã¨ã
- ãããªãã¯ãµããããã2ã¤ããã©ã¤ãã¼ããµããããã¨åãã¢ãã¤ã©ããªãã£ã¾ã¼ã³æ§æã§ä½æãã¦ãããã¨ã
- ãããªãã¯ãµããããã®ããããªã㯠IPv4 ã¢ãã¬ã¹ãèªåå²ãå½ã¦ãããã¯ããã«ãã¦ãããã¨ã
- ãã©ã¤ãã¼ããµããããã®ã«ã¼ããã¼ãã«ã«ããã¦ãããã©ã«ãã«ã¼ã(0.0.0.0/0)ã®ã¿ã¼ã²ããããåãã¢ãã¤ã©ããªãã£ã¾ã¼ã³ã®ãããªãã¯ãµããããã«é ç½®ããNAT ã²ã¼ãã¦ã§ã¤ã«ãªã£ã¦ãããã¨ã
ããã¥ã¡ã³ãã§ã®è©²å½ç®æã VPC ãããã¯ã¼ã¯ã®ä½æ - Amazon Managed Workflows for Apache Airflow
- å¿
è¦ãªCIDR
- ãããªãã¯ãµãããã1ã¤å½ããã®ãµãããããã¹ã¯
- /28 ã妥å½ãNATã²ã¼ãã¦ã§ã¤ã®ã¿é ç½®ããããã
- ãã©ã¤ãã¼ããµãããã1ã¤å½ããã®ãµãããããã¹ã¯
- /26 以ä¸ã妥å½ãæ大31åã®IPã¢ãã¬ã¹ã使ç¨ããããã
- ã¯ã¼ã«ã¼æ大25ãã¼ããã¹ã±ã¸ã¥ã¼ã©ã¼æ大5ãã¼ããã¡ã¿ãã¼ã¿ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããããã® VPC ã¨ã³ããã¤ã³ã1ã¤
- /26 以ä¸ã妥å½ãæ大31åã®IPã¢ãã¬ã¹ã使ç¨ããããã
- ãããªãã¯ãµãããã1ã¤å½ããã®ãµãããããã¹ã¯
ããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ã¶æ
ä¸ã®ããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ã¶æãã¨åãæ§æã§ãå¯è½ã§ãã
ãã ããNAT Gateway 㯠VPC ã¨ã³ããã¤ã³ãããã ãã¼ã¿éä¿¡æéã 6å以ä¸ãããããããä¸ã®æ§æããå§ãã§ãã
- VPCã®ãDNSãã¹ãåãã¨ãDNSã解決ãæå¹ã«ãªã£ã¦ãããã¨ã
- ãã©ã¤ãã¼ããµããããã2ã¤ãç°ãªãã¢ãã¤ã©ããªãã£ã¾ã¼ã³ã«é ç½®ãã¦ãããã¨ã
- ãã©ã¤ãã¼ããµããããã«ä»¥ä¸ã®VPCã¨ã³ããã¤ã³ã 10åãä½æãã¦ãããã¨ãS3 ã¯ã²ã¼ãã¦ã§ã¤åã®VPCã¨ã³ããã¤ã³ãã§ããåè
- com.amazonaws.YOUR_REGION.s3
- com.amazonaws.YOUR_REGION.monitoring
- com.amazonaws.YOUR_REGION.ecr.dkr
- com.amazonaws.YOUR_REGION.ecr.api
- com.amazonaws.YOUR_REGION.logs
- com.amazonaws.YOUR_REGION.sqs
- com.amazonaws.YOUR_REGION.kms
- com.amazonaws.YOUR_REGION.airflow.api
- com.amazonaws.YOUR_REGION.airflow.env
- com.amazonaws.YOUR_REGION.airflow.ops
ããã¥ã¡ã³ãã§ã®è©²å½ç®æã VPC ãããã¯ã¼ã¯ã®ä½æ - Amazon Managed Workflows for Apache Airflow
- å¿
è¦ãªCIDR
- ãããªãã¯ãµãããã1ã¤å½ããã®ãµãããããã¹ã¯
- /28 ã妥å½ãNATã²ã¼ãã¦ã§ã¤ã®ã¿é ç½®ãããããã«ã¹ã¿ã ãã¡ã¤ã³ã§ã¢ã¯ã»ã¹ããããã«ALBãé ç½®ããå ´å㯠/27 ã妥å½ã
- ãã©ã¤ãã¼ããµãããã1ã¤å½ããã®ãµãããããã¹ã¯
- /26 以ä¸ã妥å½ãæ大41åã®IPã¢ãã¬ã¹ã使ç¨ãããã
- ã¯ã¼ã«ã¼æ大25ãã¼ããã¹ã±ã¸ã¥ã¼ã©ã¼æ大5ãã¼ããã¡ã¿ãã¼ã¿ãã¼ã¿ãã¼ã¹ã«æ¥ç¶ããããã® VPC ã¨ã³ããã¤ã³ã1ã¤ãAirflow Web Server ã«æ¥ç¶ããããã® VPC ã¨ã³ããã¤ã³ã1ã¤ãåãµã¼ãã¹ã¨éä¿¡ããããã®VPCã¨ã³ããã¤ã³ã 9ã¤
- /26 以ä¸ã妥å½ãæ大41åã®IPã¢ãã¬ã¹ã使ç¨ãããã
- ãããªãã¯ãµãããã1ã¤å½ããã®ãµãããããã¹ã¯
DAGãã¡ã¤ã«é ç½®ç¨ S3 ãã±ãã
ä¸è¨ã®ãããã¯ã¼ã¯æ§æã«å ãã¦ãAmazon MWAA ã®ç°å¢ãä½æããã«ã¯ã以ä¸ã®S3ãã±ãããå¿
è¦ã§ãã
äºåã«ãæºåãã ããã
- ãã¹ã¦ã®ãããªãã¯ã¢ã¯ã»ã¹ããããã¯
- ãã¼ã¸ã§ãã³ã°ãæå¹
Amazon MWAA (Amazon Managed Workflows for Apache Airflow) ã®ãããã¯ã¼ã¯æ§æã¾ã¨ã
ããã¾ã§èªãã§æºåããã¨ãAmazon MWAA (Amazon Managed Workflows for Apache Airflow) ã®ãµã¼ãã¹ç»é¢ãããç°å¢ãä½æã§ããããã«ãªã£ã¦ããã¨æãã¾ãã
ç°å¢ã®ä½æã¯AWSããã¸ã¡ã³ãã³ã³ã½ã¼ã«ããç°¡åã«è¡ãã¾ãã®ã§ãæ¹æ³ã¯å²æãã¾ãã
ããã¾ã§ã®è¦ç¹ã¯ä»¥ä¸ã§ãã
VPCãï¼ç¨®é¡ããã
- ï¼ã¤ç®ã®ãCustomer VPCãã¯å©ç¨è
ãä½æã»ç®¡çããVPCã
- ãCustomer VPCãã¯ãå¿ è¦ãªCidrããæ¬è¨äºã«è¨è¼ããå¶ç´äºé ãèæ ®ãã¦ä½æããã
- ããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã§ãCustomer VPCããä½æããå ´å㯠NATã²ã¼ãã¦ã§ã¤ãããVPC ã¨ã³ããã¤ã³ããé ç½®ããæ§æã®æ¹ãã³ã¹ãã¡ãªãããããå ´åãå¤ãã
- ãCustomer VPCãã«ã¯ãApache Airflow Schedulers 㨠Airflow Worker(s) ã® Fargate ã³ã³ãããé ç½®ãå©ç¨è ããã¯ããããã®Fargateã³ã³ãã群ã¯è¦ããªãã
- ï¼ã¤ç®ã®ãService VPCãã¯Amazon管çã®VPCã§ãå©ç¨è
ããã¯è¦ããªãã
- ãService VPCãã«ã¯ãAirflow Web Server 㨠Meta Database ãé ç½®ã
- ï¼ã¤ç®ã®ãCustomer VPCãã¯å©ç¨è
ãä½æã»ç®¡çããVPCã
管çç»é¢ã¸ã®æ¥ç¶ã«ã¤ãã¦ãããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã¨ããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããããé¸ã¶ã
- ããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã¯åºæ¬çã«ã¤ã³ã¿ã¼ãããå
¬éã«ãªãã
- IPã¢ãã¬ã¹çã§å¶éããå ´åã¯ããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸æããã
- ããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã¯åºæ¬çã«ã¤ã³ã¿ã¼ãããå
¬éã«ãªãã
DAGãã¡ã¤ã«é ç½®ç¨ S3 ãã±ãããä½æãããããªãã¯ã¢ã¯ã»ã¹ã¯ç¡å¹ããã¼ã¸ã§ãã³ã°ãæå¹ã«ãã¦ããã
Amazon MWAA ã®WEB管çç»é¢ãã«ã¹ã¿ã ãã¡ã¤ã³ã§åç §ããï¼ãã¾ãï¼
Amazon MWAA ã®WEB管çç»é¢ã«èªèº«ã®ç®¡çãããã¡ã¤ã³ãç¨ãã¦æ¥ç¶ããæ¹æ³ã§ãã
質åé(FAQ)ã«ãããAmazon MWAA ã¯ã«ã¹ã¿ã ãã¡ã¤ã³ããµãã¼ããã¦ãã¾ããï¼ããåç
§ããã¨ã以ä¸ã®æ¹æ³ãããã¾ãã
ãããã¯ã¼ã¯ã¢ã¼ã | æ¹æ³ |
---|---|
ãããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ã | ã«ã¹ã¿ã ãã¡ã¤ã³ã¸ã®æ¥ç¶ãAmazon MWAA ã®WEB管çç»é¢ã«è»¢éããããã«ãCloudFront ãæ§æãã¾ããCloudFront ã«ã¯ AWS Lambda@Edge ãé¢é£ä»ããã¾ããLambda@Edge ã¯ã¦ã¼ã¶ã¼ãªã¯ã¨ã¹ãã Amazon Cognito ã«è»¢éããã¦ã¼ã¶ã¼èªè¨¼ãè¡ããã¦ãã CloudFront ã«è»¢éãã¾ãã ãµã³ãã«ã³ã¼ã |
ãã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ã | ã«ã¹ã¿ã ãã¡ã¤ã³ã¸ã®æ¥ç¶ãAmazon MWAA ã®WEB管çç»é¢ã«è»¢éããããã«ãApplication Load Balancer (ALB) ãæ§æãã¾ããããã¥ã¡ã³ã |
ãã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãã使ç¨ãã¦ããæã«ãAmazon MWAA ã®WEB管çç»é¢ãã«ã¹ã¿ã ãã¡ã¤ã³ã§åç §ãã
Application Load Balancer (ALB) ã使ã£ã¦ãæ軽ã«ã§ããããªã®ã§ããã£ã¦ã¿ã¾ããã
Application Load Balancer (ALB) ã使ãã¨ãã»ãã¥ãªãã£ã°ã«ã¼ãã§ç¹å®ã®ãããªãã¯IPã¢ãã¬ã¹ããã®æ¥ç¶ã®ã¿è¨±å¯ã§ãã¾ãã
ãUsing a Load Balancer (advanced)ããåèã«ãã£ã¦ã¿ã¾ããã
æ§æã¤ã¡ã¼ã¸ï¼
åæã¨ãã¾ãã¦ãCustomer VPC ã« ãããªãã¯ãµãããã(ç·ã®ãµãããã)ã ï¼ã¤ä½æããApplication Load Balancer (ALB)ãé
ç½®ãããã¨ã«ãã¾ããã
ãã¦ãä½æãã¦ããã¾ãããã
ã¾ããAmazon MWAA ã®ãµã¼ãã¹ç»é¢ãããAirflow UI ãã¡ã¢ãã¾ãã
ãã® UI ã® URL ã nslookup ã³ãã³ãçã§åç
§ããã¨ãAirflow Web Server ã®IPã¢ãã¬ã¹ãï¼ã¤å¾ããã¨ãã§ãã¾ãã
â»ããã¥ã¡ã³ãã§ã¯ï¼ã¤ã»ã©æé ãè¸ãã§ãåãçµæãå¾ã¦ããããã§ããï¼çç±ã¯ä¸æï¼ã
以ä¸ã®ããã«çµæãå¾ããã¨ãã§ãã¾ãã
Address: 10.192.20.95 Address: 10.192.21.131
EC2 ãµã¼ãã¹ã®ç»é¢ã§ã¿ã¼ã²ããã°ã«ã¼ããä½æãã¾ãã
- ã¿ã¼ã²ããã®ç¨®é¡ï¼IP
- ãããã³ã« : ãã¼ãï¼HTTPS: 443
- ãããã³ã«ãã¼ã¸ã§ã³ï¼HTTP1
Airflow Web Server ã®IPã¢ãã¬ã¹ï¼ã¤ãã¿ã¼ã²ããã«ç»é²ãã¾ãã
ãã«ã¹ãã§ãã¯ã®ãæåã³ã¼ããã« 302 ã追å ãã¾ãã(200,302 ã¨ããå½¢ãã«ã³ãåºåãã)
Application Load Balancer (ALB) ãä½æãããã¼ãçªå·ï¼443ã®ãªã¹ãã¼ã«ã¼ã«ã®è»¢éå ãå ã»ã©ä½æããã¿ã¼ã²ããã°ã«ã¼ãã«ãã¾ãã
Application Load Balancer (ALB) ã«ä»ããã»ãã¥ãªãã£ã°ã«ã¼ãã®ã¤ã³ãã¦ã³ãã«ã¼ã«ã« å©ç¨è ã®ãããªãã¯IPã¢ãã¬ã¹ããã® HTTPS æ¥ç¶ã許å¯ãã¾ãã
EC2 ãµã¼ãã¹ã®ç»é¢ã«ããããããã¯ã¼ã¯ã¤ã³ã¿ã¼ãã§ã¤ã¹ãã®ç»é¢ã«è¡ãã¾ãã
Airflow Web Server ã®IPã¢ãã¬ã¹ ï¼ã¤ã«ç´ã¥ããããã¯ã¼ã¯ã¤ã³ã¿ã¼ãã§ã¤ã¹ãæ¢ãã¾ãã
ããã¦ããããã¯ã¼ã¯ã¤ã³ã¿ã¼ãã§ã¤ã¹ã«ã¤ãã¦ããã»ãã¥ãªãã£ã°ã«ã¼ã ã確èªãã¾ãã
Application Load Balancer (ALB) ã«ä¸ã®ã»ãã¥ãªãã£ã°ã«ã¼ãã追å ãã¾ãã
ãã®ã»ãã¥ãªãã£ã°ã«ã¼ãã®ã¤ã³ãã¦ã³ãã«ã¼ã«ã«ã¯ãåã»ãã¥ãªãã£ã°ã«ã¼ãããã®å
¨ã¦ã®ãã©ãã£ãã¯ã許å¯ããã«ã¼ã«ãããã¾ããããã«ãããALBã¨ã¿ã¼ã²ããã°ã«ã¼ãå
ã®Airflow Web Server ã®IPã¢ãã¬ã¹ ï¼ã¤ã¨ã®çéãå¯è½ã«ãã¾ãã
æå¾ã«ãApplication Load Balancer (ALB) ã«è¨¼ææ¸ãç»é²ããDNSã¬ã³ã¼ããè¨å®ããã¨ãç¬èªãã¡ã¤ã³ã§ã¢ã¯ã»ã¹ã§ãã¾ãã
çè
㯠Route 53 ã«é©å½ãªãã¹ãã¾ã¼ã³ãä½æãã¾ããã
Aã¬ã³ã¼ãã®ã¨ã¤ãªã¢ã¹æ©è½ã§ ALB ãã¬ã³ã¼ãã«ç»é²ãã¾ããã
証ææ¸ã¯ AWS Certificate Manager (ACM)ã®ç¡æ証ææ¸ã使ç¨ãã¾ããã
ã«ã¹ã¿ã ãã¡ã¤ã³ã§ã¢ã¯ã»ã¹ã§ãã¾ããã
Amazon MWAA ã®WEB管çç»é¢ã¸ã®ãã°ã¤ã³
Amazon MWAA ã®WEB管çç»é¢ã«ãã°ã¤ã³ããã«ã¯ãIAMã¦ã¼ã¶ã¼ã«Amazon MWAAã®æä½æ¨©éãå¿
è¦ã§ãã
å¿
è¦ãªIAMããªã·ã¼ã®è©³ç´°ã«ã¤ãã¦ã¯ãAmazon MWAA ç°å¢ã¸ã®ã¢ã¯ã»ã¹ããåç
§ãã ããã
Amazon MWAAã®æä½æ¨©éãæ㤠IAMã¦ã¼ã¶ã¼ã§ãAWS CLI ãå®è¡ãã¦ãWEB管çç»é¢ã¸ã®ãã°ã¤ã³ãã¼ã¯ã³ãçºè¡ãããã°ã¤ã³ã§ãã¾ãã
çè
ã¯ãApache Airflow ã¦ã§ããã°ã¤ã³ãã¼ã¯ã³ã®ä½æããåèã«ä»¥ä¸ã®ã·ã§ã«ã¹ã¯ãªãããä½æãããã°ã¤ã³URL ãçºè¡ãã¾ããã
#!/bin/bash ENVNAME="MyAirflowEnvironment001" #Amazon MWAAã®ç°å¢å HOST="mwaa.karukozaka46.click" #Airflow UI ã®ã«ã¹ã¿ã ãã¡ã¤ã³å YOUR_URL=https://$HOST/aws_mwaa/aws-console-sso?login=true# WEB_TOKEN=$(aws mwaa create-web-login-token --name $ENVNAME --query WebToken --output text) echo $YOUR_URL$WEB_TOKEN #ãã°ã¤ã³URL
æé
æéã«ã¤ãã¾ãã¦ã¯ã以ä¸ã®å ¬å¼ããã¥ã¡ã³ãã«è¨è¼ãããã¾ãã
Amazon Managed Workflows for Apache Airflow (MWAA) ã®æé â ã¢ãã¾ã³ ã¦ã§ã ãµã¼ãã¹
ä¾ã¨ãã¾ãã¦ãæ±äº¬ãªã¼ã¸ã§ã³ã§ãã¹ã¢ã¼ã«ãµã¤ãºãä½æããAirflow Worker(s) 1å°ã Apache Airflow Schedulers 1å°ãéç¨ããå ´åã®è¡¨ãæ²ç¤ºãã¾ããã¤ã¾ããæå°æ§æã®ã¨ãã§ãã
æéç¨®å¥ | è¨ç®å¼ | æé¡(ãã«ãå°æ°ç¹ä»¥ä¸ãåæ¨äºå ¥ã) | æé¡(åãå°æ°ç¹ä»¥ä¸ãåæ¨äºå ¥ã â»1ãã« 130åã§æç®ããæã) |
---|---|---|---|
ç°å¢ã¤ã³ã¹ã¿ã³ã¹æé | 0.49USD à 24 æé/æ¥ Ã 31 æ¥é | 364.56 USãã« | 47,393å |
Airflow Worker(s) 1å°ã®æé | 追å ãã¦ããªãããããªãã追å ããã¨æéãçºçããã | 0 USãã« | 0å |
Apache Airflow Schedulers 1å°ã®æé | 追å ãã¦ããªãããããªãã追å ããã¨æéãçºçããã | 0 USãã« | 0å |
åè¨ | - | - | 47,393å |
ããããæ¤è¨¼ãã¤ã¤ããµãã¼ãåãåãããããªãã調ã¹ã¦ã¿ãã¨ãä¸ã«æ¸ãã¦ããæéã®ä»ã«ã以ä¸ã®æéãããã£ã¦ããããã§ããã
- Apache Airflow Schedulers 㨠Airflow Worker(s)ã® Fargate ã³ã³ãã群ããAWSãµã¼ãã¹ã¨éä¿¡ããéã®éä¿¡æé
- Airflow Web Server ã¸ã®éä¿¡æé
- ãã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãã®å ´åã®ã¿
ä¸è¨ãã©ããããã®æéã«ãªãã®ããç§ã®æ¤è¨¼ç°å¢ã§èª¿ã¹ã¦ã¿ã¾ããã å¾è ã®Airflow Web Server ã¸ã®éä¿¡æéã¯ããããå¾®ã ãããã®ã«ãªãã®ã§ãæ¤è¨¼ã¯çç¥ãã¾ããã
Apache Airflow Schedulers 㨠Airflow Worker(s)ã® Fargate ã³ã³ãã群ããAWSãµã¼ãã¹ã¨éä¿¡ããéã®éä¿¡æé
ä¸ã«ç´¹ä»ãããããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ã¶æãã®ãããã¯ã¼ã¯æ§æã§ãNATã²ã¼ãã¦ã§ã¤ã®éä¿¡æéãæéãè¦ã¦ã¿ããã¨ã«ãã¾ããã
ãããã¯ã¼ã¯æ§æå³ï¼
æ±äº¬ãªã¼ã¸ã§ã³ã§ãã¹ã¢ã¼ã«ãµã¤ãºãä½æããAirflow Worker(s) 1å°ã Apache Airflow Schedulers 1å°ãåããã¦ãã¾ããã¸ã§ãã¯åããã¦ãã¾ããã
ããããã¨ãããNATã²ã¼ãã¦ã§ã¤ã®æéã¯ä»¥ä¸ã®ããã«ãªãã¾ããã
- éä¿¡æé(ãã¼ã¿å¦çæé)ãï¼æ¥ãããï¼ï¼ãã«çºçãæ¥æ¬åã§ã¯ï¼æ¥ãããï¼,ï¼ï¼ï¼åãã²ã¨æããããï¼ï¼,ï¼ï¼ï¼åãéä¿¡éã¯ï¼æ¥ãããï¼ï¼ï¼GBã ã£ãã
- NAT ã²ã¼ãã¦ã§ã¤ã®æéæé ãçºçãã²ã¨æå½ãã ï¼ï¼ãã«ãæ¥æ¬åã§ã¯ã²ã¨æããããï¼ï¼,ï¼ï¼ï¼åã
åèï¼NAT ã²ã¼ãã¦ã§ã¤ã®æé
ä¸è¨ãè¸ã¾ããã¨ã表ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã
éä¿¡æéã®å²åã大ãããªãã®ããããã¾ãã
æéç¨®å¥ | è¨ç®å¼ | æé¡(ãã«ãå°æ°ç¹ä»¥ä¸ãåæ¨äºå ¥ã) | æé¡(åãå°æ°ç¹ä»¥ä¸ãåæ¨äºå ¥ã â»1ãã« 130åã§æç®ããæã) |
---|---|---|---|
ç°å¢ã¤ã³ã¹ã¿ã³ã¹æé | 0.49USD à 24 æé/æ¥ Ã 31 æ¥é | 364.56 USãã« | 47,393å |
Airflow Worker(s) 1å°ã®æé | 追å ãã¦ããªãããããªãã追å ããã¨æéãçºçããã | 0 USãã« | 0å |
Apache Airflow Schedulers 1å°ã®æé | 追å ãã¦ããªãããããªãã追å ããã¨æéãçºçããã | 0 USãã« | 0å |
Customer VPCã«é ç½®ããNATã²ã¼ãã¦ã§ã¤ã®æé | 402USãã« | 50,960å | |
åè¨ | - | - | 98,353å |
ã¹ã¢ã¼ã«ç°å¢ã®ç¶æã§ãå¹´é¡ 120ä¸åãããã¨æ¨å®ã§ãã¾ãã
NATã²ã¼ãã¦ã§ã¤ãVPCã¨ã³ããã¤ã³ãã«ç½®ãæããã¨ã»ã»ã»ã
ã§ã¯ãä¸ã«ç´¹ä»ãããããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ã¶æãã®ãããã¯ã¼ã¯æ§æã®å ´åãã©ããªãã§ãããã
ãããã¯ã¼ã¯æ§æå³ï¼
NATã²ã¼ãã¦ã§ã¤ã®éä¿¡éã¯ï¼æ¥ãããï¼ï¼ï¼GBã§ããã®ã§ãåãéä¿¡éãVPCã¨ã³ããã¤ã³ããå¦çããã¨ãã¾ãããã¡ãã¯æºä¸ã§ãã
å
訳ã¨ãã¦ãS3ã®VPCã¨ã³ããã¤ã³ãã®ã¿ãã²ã¼ãã¦ã§ã¤åã®VPCã¨ã³ããã¤ã³ãã«ãªãã¾ãã
ã²ã¼ãã¦ã§ã¤åã®VPCã¨ã³ããã¤ã³ãã¯ãéä¿¡éãæéæéãããã¾ããã
ã²ã¼ãã¦ã§ã¤ã¿ã¤ãã® VPC ã¨ã³ããã¤ã³ããè¨å®ããNAT ã²ã¼ãã¦ã§ã¤ãçµç±ããã«ãVPC ã¨ã³ããã¤ã³ããçµç±ã㦠S3 ã¨ã®éã§ãã©ãã£ãã¯ãã«ã¼ãã£ã³ã°ã§ãã¾ããã²ã¼ãã¦ã§ã¤ã¿ã¤ãã® VPC ã¨ã³ããã¤ã³ãã®ä½¿ç¨ã«å¯¾ãããã¼ã¿å¦çæéãæéåä½æéã¯çºçãã¾ãã åèï¼æé - Amazon VPC | AWS
ä»ã® ï¼åã®VPCã¨ã³ããã¤ã³ãã«ã¯ãéä¿¡éãæéæéããããã¾ãã åèï¼æé - AWS PrivateLink | AWS
以ä¸ã®åæããã以ä¸ã«æ¨ç®ããã¦ã¿ã¾ãã
ï¼åã®VPCã¨ã³ããã¤ã³ãã¯ãï¼ã¤ã®ãã©ã¤ãã¼ããµããããã«åé·åãã¦é
ç½®ãããããå®éã«ã¯ï¼ï¼åã§ãã
- ä»®ã«ãã¤ã³ã¿ã¼ãã§ã¤ã¹åã®VPCã¨ã³ããã¤ã³ãã§ï¼æ¥ãããï¼ï¼ï¼GBãå¦çããå ´åã¯ãï¼æ¥ãããï¼.ï¼ï¼ãã«çºçãæ¥æ¬åã§ã¯ï¼æ¥ãããï¼ï¼ï¼åãã²ã¨æããããï¼,ï¼ï¼ï¼åã
- ï¼ï¼åã®ã¤ã³ã¿ã¼ãã§ã¤ã¹åã®VPCã¨ã³ããã¤ã³ãã®æéæéã¯ã²ã¨æãããï¼ï¼ï¼ãã«çºçãæ¥æ¬åã§ã¯ã²ã¨æããããï¼ï¼ï¼ï¼ï¼åã
ä¸è¨ãè¸ã¾ããã¨ã表ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã
æéç¨®å¥ | è¨ç®å¼ | æé¡(ãã«ãå°æ°ç¹ä»¥ä¸ãåæ¨äºå ¥ã) | æé¡(åãå°æ°ç¹ä»¥ä¸ãåæ¨äºå ¥ã â»1ãã« 130åã§æç®ããæã) |
---|---|---|---|
ç°å¢ã¤ã³ã¹ã¿ã³ã¹æé | 0.49USD à 24 æé/æ¥ Ã 31 æ¥é | 364.56 USãã« | 47,393å |
Airflow Worker(s) 1å°ã®æé | 追å ãã¦ããªãããããªãã追å ããã¨æéãçºçããã | 0 USãã« | 0å |
Apache Airflow Schedulers 1å°ã®æé | 追å ãã¦ããªãããããªãã追å ããã¨æéãçºçããã | 0 USãã« | 0å |
Customer VPCã«é ç½®ããVPCã¨ã³ããã¤ã³ãã®æé | 237USãã« | 30,914å | |
åè¨ | - | - | 78,307å |
ã¹ã¢ã¼ã«ç°å¢ã®ç¶æã§ãå¹´é¡ 95ä¸åãããã¨æ¨å®ã§ãã¾ãã
VPCã¨ã³ããã¤ã³ããå©ç¨ããæ¹ããæéãæãããã¨ãã§ãããã§ãã
ã¾ã¨ãã
ã ãã¶æ²¢å±±æ¸ãã¾ããã®ã§ãç°¡åãªã¾ã¨ããä½ã£ã¦ããã¾ãã
- Amazon MWAAã«ã¯ãCustomer VPCãã¨ãService VPCãããããåè ã¯å©ç¨è ãä½æã管çããã
- Amazon MWAA ã® WEB管çç»é¢ (Airflow Web Server) ã«ã¯ãã¤ã³ã¿ã¼ãããçµç±ã§æ¥ç¶ããããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããããCustomer VPCãçµç±ã§æ¥ç¶ããããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããããã
- ãCustomer VPCãã®ä½æã«é¢ãã¦ã¯æ³¨æç¹ããããããæ¬è¨äºãåèã«ãã¦ããããã¨å¬ããã
- ããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããé¸ã¶å ´åã®ã¿ããCustomer VPCãã®NATã²ã¼ãã¦ã§ã¤ã VPCã¨ã³ããã¤ã³ãã«ç½®ãæãããã¨ãã§ããã
- Amazon MWAA ã®WEB管çç»é¢ãã«ã¹ã¿ã ãã¡ã¤ã³ã§åç §ãããã¨ãã§ããã
- ç°å¢ä½æã«ã¯ãDAGãã¡ã¤ã«é ç½®ç¨ S3 ãã±ãããå¿ è¦ããããªãã¯ã¢ã¯ã»ã¹ã¯ç¡å¹ããã¼ã¸ã§ãã³ã°ãæå¹ã«ãã¦ããã
- Amazon MWAA ã®WEB管çç»é¢ã¸ã®ãã°ã¤ã³ã¯IAMã¦ã¼ã¶ã¼ï¼IAMãã¼ã«ã§èªè¨¼ããããã°ã¤ã³ã«ã¯WEBãã°ã¤ã³ãã¼ã¯ã³ãå¿ è¦ãIAMã¦ã¼ã¶ã¼ï¼IAMãã¼ã«ã«ã¯é©åãªæ¨©éãå¿ è¦ã
- æéã¯ãå ¬å¼ããã¥ã¡ã³ãã«è¨è¼ã®æéã®ã»ãããCustomer VPCãã«ãããéä¿¡æéãçºçãããããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ããã®å ´åã¯ããCustomer VPCãã®NATã²ã¼ãã¦ã§ã¤ã VPCã¨ã³ããã¤ã³ãã«ç½®ãæããæ¹ãæéãæãããã¨ãã§ããã
- æéã¯æå°æ§æï¼ã¹ã¢ã¼ã«ãµã¤ãºãä½æããAirflow Worker(s) 1å°ã Apache Airflow Schedulers 1å°ãéç¨ããå ´åï¼ãããããªãã¯ãããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããªã å¹´é¡120ä¸ååå¾ãããã©ã¤ãã¼ããããã¯ã¼ã¯ã¢ã¯ã»ã¹ã¢ã¼ãããªãå¹´é¡95ä¸ååå¾ã¨æ¨å®ã
æ¸ããªãã£ããã¨ã
Amazon MWAA ãç¨ããã¸ã§ãå®è¡ã®æ¹æ³ãã¾ãå¥è¨äºã§æ¸ããã¨èãã¦ãã¾ãã
ãCustomer VPCãã«å¿
è¦ãª CIDR ãµã¤ãºãããã次第追è¨ãã¾ãã âè¨è¼æ¸ã¿ã
å±±æ¬ å²ä¹ (è¨äºä¸è¦§)
ã«ã¹ã¿ãã¼ãµã¯ã»ã¹é¨ã®ã¤ã³ãã©ã¨ã³ã¸ãã¢ã
å±±ãèµ°ãã®ã趣å³ã§ãã