ã³ã³ã½ã¼ã«ä¸ã§ã³ãã³ããå©ãã¦AWSã®ãµã¼ãã¹ã«ã¢ã¯ã»ã¹ããæ¹æ³ã§ãã
DBã¸ã®ãã¼ã¿ç»é²çãéçºãè¡ãä¸ã§å¿
è¦ã«ãªãã¯ãã§ãã
å°ãAWSã®ã¢ã«ã¦ã³ãæºåèªä½ã¯ä¸è¨ããå®æ½ã§ãã¾ãã
ikodatech.com
â ã¤ã³ã¹ãã¼ã«
AWS CLIã¨AWS SAM CLIã®äºç¨®é¡ãã¤ã³ã¹ãã¼ã«ãã¾ãã
ããç»é¢å³å´ã«ã¤ã³ã¹ãã¼ã©ã¼ã®ãªã³ã¯ãããã¾ãã
ããhttps://aws.amazon.com/jp/cli/
ããã¡ãªã¿ã«ãã¼ã¸ã§ã³2ã¨1ãããã¾ãã
ããã»version2(https://awscli.amazonaws.com/AWSCLIV2.msi)
ããã»version1(https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/install-windows.html)
ãã
ããä¸è¨ã§ã¤ã³ã¹ãã¼ã«å¯è½ã§ãã
ããhttps://github.com/aws/aws-sam-cli/releases/latest/download/AWS_SAM_CLI_64_PY3.msi
â 確èª
ä¸è¨ã§ã¤ã³ã¹ãã¼ã«ããããã¨ã確èªå¯è½ã§ãã
aws --version aws-cli/1.16.188 Python/3.6.0 Windows/10 botocore/1.12.178
sam --version SAM CLI, version 1.31.0
â ãããã¡ã¤ã«ä½æ
ä¸è¨ã«AWSä¸ã¢ã¯ã»ã¹ãã¦ãããã£ã¼ã«ãä½ãã¾ãã
https://console.aws.amazon.com/iam/
ã1."ã¦ã¼ã¶ã¼ã追å "ãã¯ãªãã¯
ã2."ã¦ã¼ã¶ã¼å"ã«ä»»æã®ååãå
¥ãã¦"ããã°ã©ã ã«ããã¢ã¯ã»ã¹"ã«ãã§ãã¯ãå
¥ãã
ã3."ã¦ã¼ã¶ã¼ã®ä½æ"ãã¯ãªãã¯
ã4.ã¢ã¯ã»ã¹ãã¼ã¨ã·ã¼ã¯ã¬ãããã¼ãã¡ã¢ãã
ã5. 4ã§ã¡ã¢ããè¨å®å¤ãç¨ãã¦ä¸è¨ã³ãã³ãã®å®è¡ãã¾ãã
ããã¾ããªã¼ã¸ã§ã³åã¯åå¨ãããªã¼ã¸ã§ã³ã§ããã°ä½ã§ãæ§ãã¾ããã®ã§"us-west-2"ãè¨å®ãã¾ããåºåå½¢å¼ã¯json ã textãã好ã¿ã§è¨å®å¯è½ã§ãâ»"test"ã®é¨åã¯ä»»æã§æ§ãã¾ããã
aws configure --profile test AWS Access Key ID [None]: XXXX AWS Secret Access Key [None]: YYYY Default region name [None]: us-west-2 Default output format [None]: json
â 確èª
ãµã³ãã«ã³ãã³ãã使ç¨ãã¦ã¤ã³ã¹ãã¼ã«ããããã¨ã確èªãã¾ãã
aws s3 ls --profile test
ããã¨ä¸è¨ã®ã¨ã©ã¼ã«ééãã¦ãã¾ãã¾ãããã
An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied
ã©ããã追å ããã¦ã¼ã¶ã¼ã«æ¨©éã足ãã¦ããªãã£ãããã§ãã
権éã®ä»ä¸ãè¡ãã¾ãã
1.ä½æããã¦ã¼ã¶ã¼ãã¯ãªãã¯
2."ã¢ã¯ã»ã¹æ¨©éã®è¿½å "ãã¯ãªãã¯
3."ã°ã«ã¼ãã®ä½æ"ãã¯ãªãã¯
4."AdministratorAccess"ããã§ãã¯â»ããã¯æ¨©éãå¼·ãããã®ã§å®éã«ä½¿ãéã¯è¦æ³¨æ
5."ã°ã«ã¼ãã®ä½æ"ãã¯ãªãã¯
6."ã¢ã¯ã»ã¹æ¨©éã®è¿½å "ãã¯ãªãã¯
â権éã®ä»ä¸ã«æåãã¾ããã
å度ææ¦ãã¾ãã
aws s3 ls --profile test 2021-07-23 11:56:30 elasticbeanstalk-us-east-2-575855985359
ç¡äºã«CLIã使ç¨ããAWSã¸ã®ã¢ã¯ã»ã¹ã«æåãã¾ããã
â åèãµã¤ã
https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-configure-quickstart.html
https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config
ããã¾ã§Â èªãã§é ããããã¨ããããã¾ããã
ãããã°ãã©ãã¼ãé¡ããã¾ãï¼