# CfnFunctionProps

Properties for defining a `CfnFunction`.

Extends: CfnFunctionProps
Used as props by: CfnFunction

- Source: Generated code
- Type last changed: v2.95.0 · 7 Sep 2023

## Example

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

declare const assumeRolePolicyDocument: any;
const cfnFunctionProps: sam.CfnFunctionProps = {
  architectures: ['architectures'],
  assumeRolePolicyDocument: assumeRolePolicyDocument,
  autoPublishAlias: 'autoPublishAlias',
  autoPublishCodeSha256: 'autoPublishCodeSha256',
  codeSigningConfigArn: 'codeSigningConfigArn',
  codeUri: 'codeUri',
  deadLetterQueue: {
    targetArn: 'targetArn',
    type: 'type',
  },
  deploymentPreference: {
    alarms: ['alarms'],
    enabled: false,
    hooks: {
      postTraffic: 'postTraffic',
      preTraffic: 'preTraffic',
    },
    role: 'role',
    type: 'type',
  },
  description: 'description',
  environment: {
    variables: {
      variablesKey: 'variables',
    },
  },
  ephemeralStorage: {
    size: 123,
  },
  eventInvokeConfig: {
    destinationConfig: {
      onFailure: {
        destination: 'destination',

        // the properties below are optional
        type: 'type',
      },
      onSuccess: {
        destination: 'destination',

        // the properties below are optional
        type: 'type',
      },
    },
    maximumEventAgeInSeconds: 123,
    maximumRetryAttempts: 123,
  },
  events: {
    eventsKey: {
      properties: {
        skillId: 'skillId',
      },
      type: 'type',
    },
  },
  fileSystemConfigs: [{
    arn: 'arn',
    localMountPath: 'localMountPath',
  }],
  functionName: 'functionName',
  functionUrlConfig: {
    authType: 'authType',

    // the properties below are optional
    cors: 'cors',
    invokeMode: 'invokeMode',
  },
  handler: 'handler',
  imageConfig: {
    command: ['command'],
    entryPoint: ['entryPoint'],
    workingDirectory: 'workingDirectory',
  },
  imageUri: 'imageUri',
  inlineCode: 'inlineCode',
  kmsKeyArn: 'kmsKeyArn',
  layers: ['layers'],
  memorySize: 123,
  packageType: 'packageType',
  permissionsBoundary: 'permissionsBoundary',
  policies: 'policies',
  provisionedConcurrencyConfig: {
    provisionedConcurrentExecutions: 'provisionedConcurrentExecutions',
  },
  reservedConcurrentExecutions: 123,
  role: 'role',
  runtime: 'runtime',
  tags: {
    tagsKey: 'tags',
  },
  timeout: 123,
  tracing: 'tracing',
  versionDescription: 'versionDescription',
  vpcConfig: {
    securityGroupIds: ['securityGroupIds'],
    subnetIds: ['subnetIds'],
  },
};
```

## Properties

- `architectures`: string[]

- `assumeRolePolicyDocument`: any

- `autoPublishAlias`: string

- `autoPublishCodeSha256`: string

- `codeSigningConfigArn`: string

- `codeUri`: string | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.S3LocationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.S3LocationProperty.html)

- `deadLetterQueue`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.DeadLetterQueueProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.DeadLetterQueueProperty.html)

- `deploymentPreference`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.DeploymentPreferenceProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.DeploymentPreferenceProperty.html)

- `description`: string

- `environment`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.FunctionEnvironmentProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.FunctionEnvironmentProperty.html)

- `ephemeralStorage`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.EphemeralStorageProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.EphemeralStorageProperty.html)

- `eventInvokeConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.EventInvokeConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.EventInvokeConfigProperty.html)

- `events`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | { [key: string]: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.EventSourceProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.EventSourceProperty.html) }

- `fileSystemConfigs`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.FileSystemConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.FileSystemConfigProperty.html)[]

- `functionName`: string

- `functionUrlConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.FunctionUrlConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.FunctionUrlConfigProperty.html)

- `handler`: string

- `imageConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.ImageConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.ImageConfigProperty.html)

- `imageUri`: string

- `inlineCode`: string

- `kmsKeyArn`: string

- `layers`: string[]

- `memorySize`: number

- `packageType`: string

- `permissionsBoundary`: string

- `policies`: string | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.IAMPolicyDocumentProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.IAMPolicyDocumentProperty.html) | string | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.IAMPolicyDocumentProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.IAMPolicyDocumentProperty.html) | [CfnFunction.SAMPolicyTemplateProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.SAMPolicyTemplateProperty.html)[]

- `provisionedConcurrencyConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.ProvisionedConcurrencyConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.ProvisionedConcurrencyConfigProperty.html)

- `reservedConcurrentExecutions`: number

- `role`: string

- `runtime`: string

- `tags`: { [key: string]: string }

- `timeout`: number

- `tracing`: string

- `versionDescription`: string

- `vpcConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnFunction.VpcConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_sam.CfnFunction.VpcConfigProperty.html)
