windows環境下だとsamをテンプレートつきでinitしようとした際に、
Error: Failed to modify a local file when cloning app templates. MAX_PATH should be enabled in the Windows registry.
とエラーが表示されることがあります。
パス長の最大値を無効化する設定を行う必要があるようです。
管理者権限でPowershellを実行し以下のコマンドを実行しましょう。
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
これでテンプレートからcloneすることができるようになります。
[参考] aws samのgitのissue
2022年7月に報告された内容で、現在msiファイルの修正中っぽいので、
近いうちに不要になる記事かもしれません。