

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# FunctionCode
<a name="sam-property-function-functioncode"></a>

[Paket deployment](https://docs.aws.amazon.com/lambda/latest/dg/deployment-package-v2.html) untuk fungsi Lambda.

## Sintaksis
<a name="sam-property-function-functioncode-syntax"></a>

Untuk mendeklarasikan entitas ini dalam template AWS Serverless Application Model (AWS SAM) Anda, gunakan sintaks berikut.

### YAML
<a name="sam-property-function-functioncode-syntax.yaml"></a>

```
  [Bucket](#sam-function-functioncode-bucket): String
  [Key](#sam-function-functioncode-key): String
  [Version](#sam-function-functioncode-version): String
```

## Sifat-sifat
<a name="sam-property-function-functioncode-properties"></a>

 `Bucket`   <a name="sam-function-functioncode-bucket"></a>
Bucket Amazon S3 di AWS Wilayah yang sama dengan fungsi Anda.  
*Tipe*: String  
*Wajib*: Ya  
*CloudFormation kompatibilitas*: Properti ini diteruskan langsung ke `[S3Bucket](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3bucket)` properti tipe `AWS::Lambda::Function` `Code` data.

 `Key`   <a name="sam-function-functioncode-key"></a>
Kunci Amazon S3 dari paket deployment.  
*Tipe*: String  
*Wajib*: Ya  
*CloudFormation kompatibilitas*: Properti ini diteruskan langsung ke `[S3Key](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3key)` properti tipe `AWS::Lambda::Function` `Code` data.

 `Version`   <a name="sam-function-functioncode-version"></a>
Untuk objek berversi, versi objek paket deployment yang digunakan.  
*Tipe*: String  
*Wajib*: Tidak  
*CloudFormation kompatibilitas*: Properti ini diteruskan langsung ke `[S3ObjectVersion](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-code.html#cfn-lambda-function-code-s3objectversion)` properti tipe `AWS::Lambda::Function` `Code` data.

## Contoh
<a name="sam-property-function-functioncode--examples"></a>

### FunctionCode
<a name="sam-property-function-functioncode--examples--functioncode"></a>

`CodeUri`: Contoh Kode Fungsi

#### YAML
<a name="sam-property-function-functioncode--examples--functioncode--yaml"></a>

```
CodeUri:
  Bucket: sam-s3-demo-bucket-name
  Key: mykey-name
  Version: 121212
```