

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# sam init
<a name="sam-cli-command-reference-sam-init"></a>

이 페이지에서는 AWS Serverless Application Model 명령줄 인터페이스(AWS SAM CLI) `sam init` 명령에 대한 참조 정보를 제공합니다.
+ 에 대한 소개는 단원을 AWS SAM CLI참조하십시오. [란 무엇입니까 AWS SAM CLI?](what-is-sam-overview.md#what-is-sam-cli) 
+ `sam init` 명령 사용에 대한 자세한 내용은 단원을 AWS SAM CLI 참조하십시오[에서 애플리케이션 생성 AWS SAM](using-sam-cli-init.md).

이 `sam init` 명령은 새 서버리스 애플리케이션을 초기화하는 옵션을 제공합니다.

## 사용법
<a name="sam-cli-command-reference-sam-init-usage"></a>

```
$ sam init <options>
```

## 옵션
<a name="sam-cli-command-reference-sam-init-options"></a>

`--app-template TEXT`  <a name="sam-cli-command-reference-sam-init-options-app-template"></a>
사용하고자 하는 관리 애플리케이션 템플릿의 식별자입니다. 확실하지 않은 경우 대화형 워크플로를 위해 옵션 없이 `sam init`을 직접 호출합니다.  
`--no-interactive`이 지정되고 `--location`가 제공되지 않은 경우, 이 매개변수는 필수입니다.  
이 매개변수는 AWS SAM CLI 버전 0.30.0 이상에서만 사용할 수 있습니다. 이 매개변수를 이전 버전과 함께 지정하면 오류가 발생합니다.

`--application-insights | --no-application-insights`  <a name="sam-cli-command-reference-sam-init-options-application-insights"></a>
 Amazon CloudWatch Application Insights 모니터링을 활성화하십시오. 자세한 내용은 [CloudWatch Application Insights를 사용하여 AWS SAM 서버리스 애플리케이션 모니터링](monitor-app-insights.md)을 참조하십시오.  
 기본 옵션은 `--no-application-insights`입니다.

`--architecture, -a [ x86_64 | arm64 ]`  <a name="sam-cli-command-reference-sam-init-options-architecture"></a>
애플리케이션의 Lambda 함수에 대한 명령어 세트 아키텍처입니다. `x86_64` 또는 `arm64` 중 하나를 지정하십시오.

`--base-image [ amazon/dotnet8-base | amazon/dotnet6-base | amazon/java25-base | amazon/java21-base | amazon/java17-base | amazon/java11-base | amazon/nodejs24.x-base | amazon/nodejs22.x-base | amazon/nodejs20.x-base | amazon/nodejs18.x-base | amazon/nodejs16.x-base | amazon/python3.14-base | amazon/python3.13-base | amazon/python3.12-base | amazon/python3.11-base | amazon/python3.10-base | amazon/python3.9-base | amazon/python3.8-base | amazon/ruby3.4-base | amazon/ruby3.3-base | amazon/ruby3.2-base ]`  <a name="sam-cli-command-reference-sam-init-options-base-image"></a>
애플리케이션의 기본 이미지입니다. 이 옵션은 패키지 유형이 `Image`인 경우에만 적용됩니다.  
`--no-interactive`이 지정되고, `--package-type`가 `Image`으로 지정되고, `--location`가 지정되지 않은 경우, 이 매개변수는 필수입니다.

`--config-env TEXT`  <a name="sam-cli-command-reference-sam-init-options-config-env"></a>
사용할 구성 파일의 기본 매개변수 값을 지정하는 환경 이름입니다. 기본값은 “기본값”입니다. 구성 파일에 대한 자세한 내용은 [AWS SAMCLI구성 파일](serverless-sam-cli-config.md) 섹션을 참조하세요.

`--config-file PATH`  <a name="sam-cli-command-reference-sam-init-options-config-file"></a>
사용할 기본 매개변수 값이 들어 있는 구성 파일의 경로 및 파일 이름입니다. 기본값은 프로젝트 디렉터리의 루트에 있는 “samconfig.toml”입니다. 구성 파일에 대한 자세한 내용은 [AWS SAMCLI구성 파일](serverless-sam-cli-config.md) 섹션을 참조하세요.

`--debug`  <a name="sam-cli-command-reference-sam-init-options-debug"></a>
디버그 로깅을 켜서 AWS SAMCLI가 생성한 디버그 메시지를 인쇄하고 타임스탬프를 표시합니다. 

`--dependency-manager, -d [ gradle | mod | maven | bundler | npm | cli-package | pip ]`  <a name="sam-cli-command-reference-sam-init-options-dependency-manager"></a>
Lambda 런타임의 종속물 관리자.

`--extra-content`  <a name="sam-cli-command-reference-sam-init-options-extra-content"></a>
템플릿의 `cookiecutter.json` 구성의 모든 사용자 지정 매개변수를 재정의합니다(예: `{"customParam1": "customValue1", "customParam2":"customValue2"}`).

`--help, -h`  <a name="sam-cli-command-reference-sam-init-options-help"></a>
이 메시지를 표시한 후 종료합니다.

`--location, -l TEXT`  <a name="sam-cli-command-reference-sam-init-options-location"></a>
템플릿 또는 애플리케이션 위치(Git, Mercurial, HTTP/HTTPS, .zip 파일, 경로)입니다.  
`--no-interactive`이 지정되고 `--runtime`, `--name` 및 `--app-template`가 제공되지 않은 경우, 이 매개변수는 필수입니다.   
Git 리포지토리의 경우 리포지토리의 루트 위치를 사용해야 합니다.  
로컬 경로의 경우 템플릿은. zip 파일 또는 [Cookiecutter](https://cookiecutter.readthedocs.io/en/latest/README.html) 형식이어야 합니다.

`--name, -n TEXT`  <a name="sam-cli-command-reference-sam-init-options-name"></a>
디렉터리로 생성할 프로젝트의 이름입니다.  
`--no-interactive`이 지정되고 `--location`가 제공되지 않은 경우, 이 매개변수는 필수입니다.

`--no-input`  <a name="sam-cli-command-reference-sam-init-options-no-input"></a>
Cookiecutter 프롬프트를 비활성화하고 템플릿 구성에 정의된 vcfdefault 값을 승인합니다.

`--no-interactive`  <a name="sam-cli-command-reference-sam-init-options-no-interactive"></a>
초기 매개변수에 대한 대화식 프롬프트를 비활성화하고 필수 값이 누락되면 실패합니다.

`--output-dir, -o PATH`  <a name="sam-cli-command-reference-sam-init-options-output-dir"></a>
초기화된 응용 프로그램이 출력되는 위치입니다.

`--package-type [ Zip | Image ]`  <a name="sam-cli-command-reference-sam-init-options-package-type"></a>
예제 애플리케이션의 패키지 유형입니다. `Zip`이 .zip 파일 아카이브를 만들고 `Image`가 컨테이너 이미지를 만듭니다.

`--runtime, -r [ dotnet8 | dotnet6 | java25 | java21 | java17 | java11 | nodejs24.x | nodejs22.x | nodejs20.x | nodejs18.x | nodejs16.x | python3.14 | python3.13 | python3.12 | python3.11 | python3.10 | python3.9 | python3.8 | ruby3.4 | ruby3.3 | ruby3.2 ]`  <a name="sam-cli-command-reference-sam-init-options-runtime"></a>
애플리케이션의 Lambda 런타임입니다. 이 옵션은 패키지 유형이 `Zip`인 경우에만 적용됩니다.  
`--no-interactive`이 지정되고, `--package-type`가 `Zip`으로 지정되고, `--location`가 지정되지 않은 경우, 이 매개변수는 필수입니다.

`--save-params`  <a name="sam-cli-command-reference-sam-init-options-save-params"></a>
명령줄에 제공한 파라미터를 AWS SAM 구성 파일에 저장합니다.

`--tracing | --no-tracing`  <a name="sam-cli-command-reference-sam-init-options-tracing"></a>
Lambda 함수에 대한 AWS X-Ray 추적을 활성화합니다.

## 예제
<a name="sam-cli-command-reference-sam-init-examples"></a>

`sam init` 하위 명령 사용에 대한 자세한 예제와 심층적인 단계별 설명은 [에서 애플리케이션 생성 AWS SAM](using-sam-cli-init.md) 섹션을 참조하세요.