## 前提条件 - [[Windows 10]] - [[AWS SAM CLIのインストール]]が完了している (v1.57.0) - [[AWS SAMに必要なcredentialsの設定]]が完了している - [[Git]]がインストールされている - [[Windows 10で長いパスを有効]]にしている ## サンプルダウンロード ``` $ sam init You can preselect a particular runtime or package type when using the `sam init` experience. Call `sam init --help` to learn more. Which template source would you like to use? 1 - AWS Quick Start Templates 2 - Custom Template Location Choice: 1 Choose an AWS Quick Start application template 1 - Hello World Example 2 - Multi-step workflow 3 - Serverless API 4 - Scheduled task 5 - Standalone function 6 - Data processing 7 - Infrastructure event management 8 - Lambda EFS example 9 - Machine Learning Template: 3 Which runtime would you like to use? 1 - dotnet6 2 - dotnetcore3.1 3 - nodejs16.x 4 - nodejs14.x 5 - nodejs12.x Runtime: 3 Based on your selections, the only Package type available is Zip. We will proceed to selecting the Package type as Zip. Based on your selections, the only dependency manager available is npm. We will proceed copying the template using npm. Would you like to enable X-Ray tracing on the function(s) in your application? [y/N]: n Project name [sam-app]: Cloning from https://github.com/aws/aws-sam-cli-app-templates (process may take a moment) ----------------------- Generating application: ----------------------- Name: sam-app Runtime: nodejs16.x Architectures: x86_64 Dependency Manager: npm Application Template: quick-start-web Output Directory: . Next steps can be found in the README file at ./sam-app/README.md Commands you can use next ========================= [*] Create pipeline: cd sam-app && sam pipeline init --bootstrap [*] Validate SAM template: sam validate [*] Test Function in the Cloud: sam sync --stack-name {stack-name} --watch ``` > [!hint] > エラーになる場合は、[[📝sam initで`Unstable state when updating repoエラー`]]を参照。 ## 動作確認 ```console $ cd sam-app $ sam pipeline init --bootstrap ``` > [!todo] > 動かなかったので今度続きを...