Throws with a clear hint when the `aws` CLI is not on PATH.
()
| 35 | |
| 36 | /** Throws with a clear hint when the `aws` CLI is not on PATH. */ |
| 37 | function assertAwsCliAvailable(): void { |
| 38 | try { |
| 39 | execFileSync("aws", ["--version"], { stdio: "ignore" }); |
| 40 | } catch { |
| 41 | throw new Error( |
| 42 | "`aws` CLI not found on PATH. Install from https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html and configure credentials before retrying.", |
| 43 | ); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | export interface DeployOptions { |
| 48 | /** Repository root — the SAM template lives at `examples/aws-lambda/template.yaml` underneath. */ |