æåã«3è¡ã§ã¾ã¨ã AWS CLIã¯ä¾¿å©ã§ãããããèµ·åãé ãã®ã§ãGoã§å®è£ ãããé«éãª(ãã ãæ©è½ã¯å°ãªã)代æ¿åãä½ãã¾ãããawslim ã¨ããã¾ã ãªãªã¼ã¹ãã¤ããªã¯ç¡é§ã«å¤§ããã®ã§ãå¿ è¦ãªæ©è½ã ããçµã¿è¾¼ãã ãã«ããç°¡åã«ã§ããããã«ãã¦ããã¾ãããã«ããã¦ä½¿ãã®ããå§ãã§ã ã©ãããå©ç¨ä¸ãã github.com 以ä¸ã¯ããã«è³ãã¾ã§ã®çµç·¯ã¨ããå®è£ ã使ãæ¹ã®è©±ã¨ãã§ããé·ãã§ãã ä½æã®çµç·¯ AWSã®å種ãµã¼ãã¹ã«ã¢ã¯ã»ã¹ããããã® AWS CLI ã¯ãã¹ã¯ãªãããã³ãã³ãã©ã¤ã³ããå¦çãèªååããããã«å¤§å¤ä¾¿å©ãªãã¼ã«ã§ããAWSã§ãµã¼ãã¼ãµã¤ãã®éçºãéç¨ãã¦ãã人ã§ããã°ãã»ã¼å ¨å¡ããä¸è©±ã«ãªã£ã¦ããããããªããã¨æãã¾ãã ããããAWS CLI (ã³ãã³ãåaws) ã«ã¯ãèµ·åãéããã¨ããåé¡ããããªã¨ãã£ã¨æã£ã¦ãã¾ãããå ·ä½çã«ã¯ãaws --versio
git stashããã£ã¨ä¾¿å©ã«æ±ãããã¨æããfzfã使ã£ã¦ä½¿ãããããã¦ã¿ãã以ä¸ã®URLã«è¼ã£ã¦ãããã®ãåèã«ãã¦èªåã«ã¨ã£ã¦ä½¿ããããããã«æ¹å¤ããã fzfã§GUIé¸æãããã¡ã¤ã«ãgit stashããã·ã§ã«ã¹ã¯ãªãã git-stash-explore ã§ããã㨠ä»ã®å¤æ´ãã¡ã¤ã«ãfzfã使ã£ã¦é¸æãã¦ãé¸æãããã®ã ããstash (git-stash-select) stashä¸è¦§ã®ä¸ããä¸èº«ãpreviewããªããé¸ã³ãapply or deleteãã (git-stashes) ç¾å¨ã®å¤æ´ãã¡ã¤ã«ããä¸é¨ãé¸ãã§git stashããã³ãã³ã fzfã§GUIé¸æãããã¡ã¤ã«ãgit stashããã·ã§ã«ã¹ã¯ãªãã ãåèã«ãgit-stash-selectã¨ããã³ãã³ããä½ã£ãã #!/usr/bin/env bash # Get the root direct
å æ¥ãScala CLI v1.0.0ãã¤ãã«ãªãªã¼ã¹ããããããã¾ã§ã¯v0ç³»åã ã£ãã®ã§ãæºãæãã¦ã®æ£å¼çãªãªã¼ã¹ã ãããã§ã¨ãï¼ github.com ãã¡ãã説æãã¦ããã¨Scala CLIã¯ç·åçãªScalaã®ã³ãã³ãã©ã¤ã³ãã¼ã«ã§ã以ä¸ã®ãããªãã¨ãã§ãã: Uber JAR(åä½ã§åä½ããJARãã¡ã¤ã«)ã®çæ GraalVMã使ã£ããã¤ããªã®çæ Scala Nativeã使ã£ããã¤ããªã®çæ REPL Scala Scriptã®å®è¡ç°å¢ ãã®ããã«å¤å½©ãªæ©è½ãæã¤Scala CLIã¯ãç¾å¨ã®scalaã³ãã³ããç½®æãã¦å°æ¥çãªscalaã³ãã³ãã«ãªããã¨ã決ã¾ã£ã¦ããã ãã¦ããªãªã¼ã¹ãã¼ãã«ããã°Scala CLIã§ã¯v1.0.0ããScala 3.3.0ãããã©ã«ãã§å©ç¨ãããã¨ã«ãªã£ããScala 3.3.0ã«ã¯ããã¤ãã®ä¿®æ£ã追å æ©è½ãå«ã¾ãã¦ããããä»åã¯ãã®ä¸
chat-hatenablogãpip installã§ã¤ã³ã¹ãã¼ã«å¯è½ã«ãã - $shibayu36->blog;ã«ã¦chat-hatenablogãpip installã§ããããã«ããã¨ããã¦ã¼ã¶ã¼è¨å®ãã¡ã¤ã«ããã¼ã¿ãã©ãã«é ç½®ãããã«è¿·ã£ãããã®ãã¼ã«ã§ã¯ãç°å¢å¤æ°ã®è¨å®ã¨ãã¦.envãã¡ã¤ã«ããããã°ãã¼ã¿ã®ã¤ã³ããã¯ã¹ã¨ãã¦index.pickleãã¡ã¤ã«ã使ã£ã¦ããã ãããã®ãã¡ã¤ã«ã®ç½®ãå ´æã«ã¤ãã¦å°ãã ã調ã¹ãã®ã§ãç¾ç¶åãã£ããã¨ãã¡ã¢ãã¦ããã ã¾ãé¸æè¢ã¨ãã¦ã¯äºã¤ããããã ã£ãã ~/.chat-hatenablog/.envã¨~/.chat-hatenablog/index.pickle ä¾) ~/.asdfã~/.dockerã~/.gemãªã© XDG Base Directoryã®ä»æ§ã«æ²¿ã£ã¦ã~/.config/chat-hatenablog/.en
AWSã¢ã«ã¦ã³ããçµç¹ã§ç®¡çãã¦ããã¨è¤æ°ã¢ã«ã¦ã³ãå©ç¨ããã±ã¼ã¹ã¯å¤ããã¨æããå¥ã®ã¢ã«ã¦ã³ãã«åãæ¿ããã«ã¯ãWebã³ã³ã½ã¼ã«ããSwitch Roleããã°ãããããã¦ä»¥ä¸ã®ããã« $HOME/.aws/config 㨠$HOME/.aws/credentials ãè¨å®ããã°AWS CLIãããSwitch Roleã§ããã $ cat $HOME/.aws/credentials [main-account] aws_access_key_id = ACCESS_KEY_ID aws_secret_access_key = SECRET_ACCESS_KEY $ cat $HOME/.aws/config [profile sub-account] source_profile = main-account role_arn = ROLE_ARN mfa_serial = MF
AWSã¢ã¯ã»ã¹ãã¼ã»ãã¥ãªãã£æèåä¸å§å¡ä¼ã£ã¦ä½ï¼ æ¨ä»ãAWSã®ã¢ã¯ã»ã¹ãã¼ãæ¼æ´©ããã¦ãã¾ããã¨ãåå ã§ã¢ã«ã¦ã³ãã¸ã®ä¾µå ¥ãåãã å¤é¡ã®å©ç¨è²»çºçã»æ å ±æ¼æ´©çããªã©é大ãªã»ãã¥ãªãã£äºæ¡ãçºçããã±ã¼ã¹ãå®éã«å¤ã èµ·ãã¦ãã¾ãã ããã§ãã¢ã¯ã»ã¹ãã¼éç¨ã«é¢ããå®å ¨åä¸ã®åçµã¿ãããã°ã§ãç´¹ä»ããä¼ç»ãã¯ããã¾ããã ã¢ã¯ã»ã¹ãã¼ãå©ç¨ããå ´åã¯å©ç¨ããä¸ã§ã®ãªã¹ã¯ãæ£ããç解ãã ã»ãã¥ãªãã£å¯¾çãäºåã«é©ç¨ããä¸ã§é©åã«ãå©ç¨ãã ããã AWS Valutã¨ã¯ AWSã®ã¢ã¯ã»ã¹ãã¼/ã·ã¼ã¯ã¬ãããã¼ãå®å ¨ã«ä¿åã»å©ç¨ããããã®OSSã½ããã¦ã§ã¢ã§ãã AWS CLIã ãã§ã¯ãªããboto3çAWS SDKãç¨ããéçºã Terraformçã®ãµã¼ããã¼ãã£ã¢ããªã±ã¼ã·ã§ã³ã§ãå©ç¨ãããã¨ãåºæ¥ã¾ãã AWS Vaultã¯IAMèªè¨¼æ å ±ãOSã®ãã¼ã¹ãã¢ã«ä¿åããèªè¨¼æ å ±ã®å©ç¨æ
AWS Loft好ãã®Kyoã§ããCLIã好ãã§ä¿®è¡ä¸ã§ãã AWS CLIã§ã¹ã¤ãããã¼ã«ããéã®è¨å®ã«å°ã£ãã®ã§æ å ±ãæ®ãã¦ããããã¨æãã¾ãã åæ aws-cli/1.16.232 Python/3.7.3 Darwin/18.7.0 botocore/1.12.222 ãã¼ã¹ã¨ãªãã¢ã«ã¦ã³ãã®IAMã¦ã¼ã¶ãããå¥ã¢ã«ã¦ã³ãã®IAMãã¼ã«ã«ã¹ã¤ãããã¼ã«ãã¦ãCLIããæä½ãè¡ã AWS CLIã®è¨å®ã¯å®äºæ¸ã¿ ~/.aws/ã«ã¹ã¤ãããã¼ã«å ã®IAMã¦ã¼ã¶ã® aws_access_key_idã¨aws_secret_access_key ãè¨å®ããã¦ãã ~/.aws/config ã以ä¸ã®æ§ã«è¨å®ããã¦ãã [default] region=ap-northeast-1 output=json è¨å® ã¹ã¤ãããã¼ã«å ã®ãããã¡ã¤ã«ãtest001ã¨åä»ããdefault ã®ä¸ã«
以åãScalaã使ã£ã¦CLIãã¼ã«ãä½ãã¨ããè¨äºãæ¸ããã®ã§ããããã¯ãJVMãã¼ã¹ã®ã¢ããªã±ã¼ã·ã§ã³ã«ã¯èµ·åæéã®ãªã¼ãã¼ããããä»ãç©ãªã®ã§ã¡ãã£ã¨ããCLIãã¼ã«ãScalaã§æ¸ããã¨ããæãã«ã¯ãªããªããªãã¾ãããããã§ä»åã¯Picocliã¨ããJavaåãã®CLIãã¼ã«ç¨ã©ã¤ãã©ãªã¨GraalVMã使ã£ã¦ãã¤ãã£ãCLIã³ãã³ããScalaã§ä½ãæ¹æ³ã試ãã¦ã¿ã¾ããã github.com sbtããã¸ã§ã¯ãã®ä½æ ä»åã¯Picocliã®ããã¥ã¡ã³ãã§ä¾ã¨ãã¦æ²è¼ããã¦ããchecksumã³ãã³ããScalaã§å®è£ ãã¦ã¿ã¾ããã¾ãã¯ä»¥ä¸ã®å 容ã§build.sbtãä½æãã¾ãã name := "picocli-scala-example" version := "0.1" scalaVersion := "2.12.7" libraryDependencies ++= Seq
EC2 ã® start ã ã£ãã CloudFront ãã£ã¹ããªãã¥ã¼ã·ã§ã³ã®ãããã¤ã ã£ããã æ°ååä½ã§æéã®ãããå¦çã®å®äºãå¾ ã¤ã®ã«ãAWS CLI ã® wait ã³ãã³ãã¯ããã便å©ã§ãã ã§ã wait ã³ãã³ãèªä½ã¯ãæå®ããå¦çãå®äºãããéãã«çµäºãããã¨ããåä½1ãªã®ã§ã ãµã¨æ°ãã¤ãããå¦çãçµãã£ã¦ããã»çµãã£ããã¨ã«æ°ä»ããªãã£ããã¨ãããã¨ããã£ã¦å°ãã¾ãã ãããªæãecho ã³ãã³ãã§ãã«ãé³´ããã¨ä¾¿å©ã§ãã æ¬é¡ã®åã« : AWS CLI ã® wait ã³ãã³ãã«ã¤ã㦠ããå¦çãå®äºããã¾ã§çµäºããªãã³ãã³ãï¼Waiters ãµãã³ãã³ãï¼ã§ãã AWS CLIã®Waitersã«ããå¾ ã¡åãå¦çãå®è£ ãã ä¾ãã° CloudFront ã®ã¨ãããã£ã¹ããªãã¥ã¼ã·ã§ã³ã§ã è¨å®å¤æ´å¾ã« InProgress ãã Deployed ã«ãªãã¾ã§å¾ ã¤å ´åã«ã¯
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}