# CfnParametersCodeProps

Construction properties for `CfnParametersCode`.

Extends: CfnParametersCodeProps
Used as props by: CfnParametersCode

- Source: [`aws-lambda/lib/code.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-lambda/lib/code.ts#L578)
- Type last changed: v2.271.0 · 25 Sep 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';
import { aws_kms as interfaces_kms } from 'aws-cdk-lib/interfaces';

declare const cfnParameter: cdk.CfnParameter;
declare const keyRef: interfaces_kms.IKeyRef;
const cfnParametersCodeProps: lambda.CfnParametersCodeProps = {
  bucketNameParam: cfnParameter,
  objectKeyParam: cfnParameter,
  sourceKMSKey: keyRef,
};
```

## Properties

- `bucketNameParam`: [CfnParameter](/cdk/api/v2/docs/aws-cdk-lib.CfnParameter.html) = a new parameter will be created — The CloudFormation parameter that represents the name of the S3 Bucket where the Lambda code will be located in.

  Must be of type 'String'.

- `objectKeyParam`: [CfnParameter](/cdk/api/v2/docs/aws-cdk-lib.CfnParameter.html) = a new parameter will be created — The CloudFormation parameter that represents the path inside the S3 Bucket where the Lambda code will be located at.

  Must be of type 'String'.

- `sourceKMSKey`: [IKeyRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_kms.IKeyRef.html) = Lambda uses an AWS owned key — The KMS key that Lambda uses to encrypt the deployment package in Lambda-managed storage.

  This is not the key used to encrypt the source object in Amazon S3.
