CfnFunctionProps

class aws_cdk.aws_sam.CfnFunctionProps(*, code_uri, handler, runtime, auto_publish_alias=None, dead_letter_queue=None, deployment_preference=None, description=None, environment=None, events=None, file_system_configs=None, function_name=None, kms_key_arn=None, layers=None, memory_size=None, permissions_boundary=None, policies=None, provisioned_concurrency_config=None, reserved_concurrent_executions=None, role=None, tags=None, timeout=None, tracing=None, vpc_config=None)

Bases: object

Properties for defining a AWS::Serverless::Function.

Parameters
  • code_uri (Union[str, IResolvable, S3LocationProperty]) – AWS::Serverless::Function.CodeUri.

  • handler (str) – AWS::Serverless::Function.Handler.

  • runtime (str) – AWS::Serverless::Function.Runtime.

  • auto_publish_alias (Optional[str]) – AWS::Serverless::Function.AutoPublishAlias.

  • dead_letter_queue (Union[IResolvable, DeadLetterQueueProperty, None]) – AWS::Serverless::Function.DeadLetterQueue.

  • deployment_preference (Union[IResolvable, DeploymentPreferenceProperty, None]) – AWS::Serverless::Function.DeploymentPreference.

  • description (Optional[str]) – AWS::Serverless::Function.Description.

  • environment (Union[IResolvable, FunctionEnvironmentProperty, None]) – AWS::Serverless::Function.Environment.

  • events (Union[IResolvable, Mapping[str, Union[IResolvable, EventSourceProperty]], None]) – AWS::Serverless::Function.Events.

  • file_system_configs (Union[IResolvable, Sequence[Union[IResolvable, FileSystemConfigProperty]], None]) – AWS::Serverless::Function.FileSystemConfigs.

  • function_name (Optional[str]) – AWS::Serverless::Function.FunctionName.

  • kms_key_arn (Optional[str]) – AWS::Serverless::Function.KmsKeyArn.

  • layers (Optional[Sequence[str]]) – AWS::Serverless::Function.Layers.

  • memory_size (Union[int, float, None]) – AWS::Serverless::Function.MemorySize.

  • permissions_boundary (Optional[str]) – AWS::Serverless::Function.PermissionsBoundary.

  • policies (Union[str, IResolvable, IAMPolicyDocumentProperty, Sequence[Union[str, IResolvable, IAMPolicyDocumentProperty, SAMPolicyTemplateProperty]], None]) – AWS::Serverless::Function.Policies.

  • provisioned_concurrency_config (Union[IResolvable, ProvisionedConcurrencyConfigProperty, None]) – AWS::Serverless::Function.ProvisionedConcurrencyConfig.

  • reserved_concurrent_executions (Union[int, float, None]) – AWS::Serverless::Function.ReservedConcurrentExecutions.

  • role (Optional[str]) – AWS::Serverless::Function.Role.

  • tags (Optional[Mapping[str, str]]) – AWS::Serverless::Function.Tags.

  • timeout (Union[int, float, None]) – AWS::Serverless::Function.Timeout.

  • tracing (Optional[str]) – AWS::Serverless::Function.Tracing.

  • vpc_config (Union[IResolvable, VpcConfigProperty, None]) – AWS::Serverless::Function.VpcConfig.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Attributes

auto_publish_alias

AWS::Serverless::Function.AutoPublishAlias.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

code_uri

AWS::Serverless::Function.CodeUri.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[str, IResolvable, S3LocationProperty]

dead_letter_queue

AWS::Serverless::Function.DeadLetterQueue.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, DeadLetterQueueProperty, None]

deployment_preference

AWS::Serverless::Function.DeploymentPreference.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#deploymentpreference-object

Return type

Union[IResolvable, DeploymentPreferenceProperty, None]

description

AWS::Serverless::Function.Description.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

environment

AWS::Serverless::Function.Environment.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, FunctionEnvironmentProperty, None]

events

AWS::Serverless::Function.Events.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, Mapping[str, Union[IResolvable, EventSourceProperty]], None]

file_system_configs

AWS::Serverless::Function.FileSystemConfigs.

Link

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html

Return type

Union[IResolvable, List[Union[IResolvable, FileSystemConfigProperty]], None]

function_name

AWS::Serverless::Function.FunctionName.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

handler

AWS::Serverless::Function.Handler.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

str

kms_key_arn

AWS::Serverless::Function.KmsKeyArn.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

layers

AWS::Serverless::Function.Layers.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[List[str]]

memory_size

AWS::Serverless::Function.MemorySize.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[int, float, None]

permissions_boundary

AWS::Serverless::Function.PermissionsBoundary.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

policies

AWS::Serverless::Function.Policies.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[str, IResolvable, IAMPolicyDocumentProperty, List[Union[str, IResolvable, IAMPolicyDocumentProperty, SAMPolicyTemplateProperty]], None]

provisioned_concurrency_config

AWS::Serverless::Function.ProvisionedConcurrencyConfig.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, ProvisionedConcurrencyConfigProperty, None]

reserved_concurrent_executions

AWS::Serverless::Function.ReservedConcurrentExecutions.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[int, float, None]

role

AWS::Serverless::Function.Role.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

runtime

AWS::Serverless::Function.Runtime.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

str

tags

AWS::Serverless::Function.Tags.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[Mapping[str, str]]

timeout

AWS::Serverless::Function.Timeout.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[int, float, None]

tracing

AWS::Serverless::Function.Tracing.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Optional[str]

vpc_config

AWS::Serverless::Function.VpcConfig.

Link

https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction

Return type

Union[IResolvable, VpcConfigProperty, None]