Name:
interface
Value:
Amplify has re-imagined the way frontend developers build fullstack applications. Develop and deploy without the hassle.

Page updated Apr 30, 2024

Maintenance ModeYou are viewing Amplify Gen 1 documentation. Amplify Gen 1 has entered maintenance mode and will reach end of life on May 1, 2027. New project should use Amplify Gen 2. For existing Gen 1 projects, a migration guide and tooling are available to help you upgrade. Switch to the latest Gen 2 docs →

アプリをデプロイしてホストする

Amplify で初めてのアプリの構築に成功しました!これで何かを構築したので、Amplify Hosting を使ってウェブにデプロイして他の人と共有する時間です!

アプリにホスティングを追加する

ウェブアプリを手動でデプロイするか、自動継続デプロイメントを設定できます。このガイドでは、静的ウェブアプリを手動でデプロイしてホストし、すぐに他の人と共有する方法について説明します。継続デプロイメントについて学びたい場合は、このガイドに従ってください。

プロジェクトのルートから、次のコマンドを実行してください:

amplify add hosting

以下のプロンプトのデフォルトを選択します:

? Select the plugin module to execute: Hosting with Amplify Console (Managed hosting with custom domains, Continuous deployment)
? Choose a type: Manual Deployment

アプリを公開する

次のコマンドを実行してアプリを公開します。

amplify publish

バンドルサイズに基づいて "Error: bundle initial exceeded maximum budget" エラーが発生した場合は、Angular アプリケーションの最大バンドルサイズ予算を増やす必要があります。angular.jsonbudgets キーワードを見つけて、maximumError を増やしてください:

{
// ...
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "2mb"
}
// ...
]
}

おめでとうございます。アプリがオンラインになりました!

公開後、ターミナルに amplifyapp.com ドメインでホストされているアプリの URL が表示されます。公開する追加の変更がある場合は、amplify publish コマンドを再実行してください。

アプリの配信ディレクトリが正しく設定されていない場合、"AccessDenied" エラーが発生する可能性があります。これを修正するには、amplify configure project で配信ディレクトリを変更してから、amplify publish を再実行してください。

Amplify Console でアプリとホスティング設定を表示するには、amplify console コマンドを実行します。

注: プロジェクトのすべての環境をクラウドから削除し、Amplify CLI で作成されたすべてのローカルファイルをクリアするには、amplify delete コマンドを実行してください。