AWS Amplifyを使用する準備

AWS Amplifyを使ってアプリを作成するためにAWS Amplify Cliを設定します。

環境

項目 バージョン
node v10.15.3
npm 6.4.1
@aws-amplify/cli 1.6.11

前提

Amplify CLIを利用するには、node.jsのversion 8以上また、npmのversion 5以上が必要です。

CLIをインストール

以下コマンドを実行し、インストールします。

npm install -g @aws-amplify/cli

設定

続いて以下を実行します。

amplify configure

実行すると、以下の様にいろいろと質問などが始まりますので、答えていきます。

Sign in

まずは、ブラウザが立ち上がりSign inを求められます。
Sign inしたら、Enterを押下します。

Follow these steps to set up access to your AWS account:

Sign in to your AWS administrator account:

https://console.aws.amazon.com/
Press Enter to continue

AWS Sign in

リージョンの選択

リージョンの選択です。任意のリージョンを選択します。

Specify the AWS Region
? region: (Use arrow keys)
❯ us-east-1
us-east-2
us-west-2
eu-west-1
eu-west-2
eu-central-1
ap-northeast-1
(Move up and down to reveal more choices)

IAMユーザの作成

IAMユーザの名前の入力を求められます。デフォルトのままの場合、Enter 以外の場合は任意で入力します。

Specify the username of the new IAM user:
? user name: (amplify-VWbEf)

ユーザ名を決定すると、再度ブラウザに移り、IAMユーザの作成が始まります。
作成したら、Enterを押下します。

Complete the user creation using the AWS console

https://console.aws.amazon.com/iam/home?<
長いので省略> Press Enter to continue

AWS Sign in
Policyについては、ドキュメントにデフォルトは管理者アクセス権と記載があるので AdministratorAcess を選択します。
AWS Sign in
後はStepに従って完了です。

アクセスキー/シークレットアクセスキーの設定

作成したIAMユーザのアクセスキーIDを入力して Enter を押下します。

Enter the access key of the newly created user:
? accessKeyId: ()

続いてシークレットアクセスキーを入力して Enter を押下します。

? secretAccessKey: ()

ローカルに保存するプロファイル名の決定

ローカルに保存するAWSプロファイルの名前を任意で入力します。

This would update/create the AWS Profile in your local machine
? Profile Name: (default)

設定完了

以上で設定は完了です。

Successfully set up the new user.

コメント

株式会社CONFRAGE ITソリューション事業部をもっと見る

今すぐ購読し、続きを読んで、すべてのアーカイブにアクセスしましょう。

続きを読む

タイトルとURLをコピーしました