stratosphere-0.2.0: EDSL for AWS CloudFormation

Safe HaskellNone
LanguageHaskell2010

Stratosphere.Resources.LambdaFunction

Description

The AWS::Lambda::Function resource creates an AWS Lambda (Lambda) function that can run code in response to events. For more information, see CreateFunction in the AWS Lambda Developer Guide.

Synopsis

Documentation

data LambdaFunction Source #

Full data type definition for LambdaFunction. See lambdaFunction for a more convenient constructor.

Instances

Show LambdaFunction Source # 
Generic LambdaFunction Source # 

Associated Types

type Rep LambdaFunction :: * -> * #

ToJSON LambdaFunction Source # 
FromJSON LambdaFunction Source # 
type Rep LambdaFunction Source # 
type Rep LambdaFunction = D1 (MetaData "LambdaFunction" "Stratosphere.Resources.LambdaFunction" "stratosphere-0.2.0-B1WeL9cnxuQ3qer3csMa6f" False) (C1 (MetaCons "LambdaFunction" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_lambdaFunctionCode") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 LambdaFunctionCode)) (S1 (MetaSel (Just Symbol "_lambdaFunctionDescription") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Text))))) ((:*:) (S1 (MetaSel (Just Symbol "_lambdaFunctionFunctionName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Text)))) (S1 (MetaSel (Just Symbol "_lambdaFunctionHandler") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Val Text))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_lambdaFunctionMemorySize") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Integer')))) (S1 (MetaSel (Just Symbol "_lambdaFunctionRole") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Val Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_lambdaFunctionRuntime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Val Text))) ((:*:) (S1 (MetaSel (Just Symbol "_lambdaFunctionTimeout") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Integer')))) (S1 (MetaSel (Just Symbol "_lambdaFunctionVpcConfig") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe LambdaFunctionVPCConfig))))))))

lambdaFunction Source #

Constructor for LambdaFunction containing required fields as arguments.

lfCode :: Lens' LambdaFunction LambdaFunctionCode Source #

The source code of your Lambda function. You can point to a file in an Amazon Simple Storage Service (Amazon S3) bucket or specify your source code as inline text.

lfDescription :: Lens' LambdaFunction (Maybe (Val Text)) Source #

A description of the function.

lfFunctionName :: Lens' LambdaFunction (Maybe (Val Text)) Source #

A name for the function. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type. Important If you specify a name, you cannot do updates that require this resource to be replaced. You can still do updates that require no or some interruption. If you must replace the resource, specify a new name.

lfHandler :: Lens' LambdaFunction (Val Text) Source #

The name of the function (within your source code) that Lambda calls to start running your code. For more information, see the Handler property in the AWS Lambda Developer Guide. Note If you specify your source code as inline text by specifying the ZipFile property within the Code property, specify index.function_name as the handler.

lfMemorySize :: Lens' LambdaFunction (Maybe (Val Integer')) Source #

The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide. Your function use case determines your CPU and memory requirements. For example, a database operation might need less memory than an image processing function. You must specify a value that is greater than or equal to 128, and it must be a multiple of 64. You cannot specify a size larger than 1536. The default value is 128 MB.

lfRole :: Lens' LambdaFunction (Val Text) Source #

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) execution role that Lambda assumes when it runs your code to access AWS services.

lfRuntime :: Lens' LambdaFunction (Val Text) Source #

The runtime environment for the Lambda function that you are uploading. For valid values, see the Runtime property in the AWS Lambda Developer Guide.

lfTimeout :: Lens' LambdaFunction (Maybe (Val Integer')) Source #

The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time. By default, Timeout is set to 3 seconds.

lfVpcConfig :: Lens' LambdaFunction (Maybe LambdaFunctionVPCConfig) Source #

If the Lambda function requires access to resources in a VPC, specify a VPC configuration that Lambda uses to set up an elastic network interface (ENI). The ENI enables your function to connect to other resources in your VPC, but it doesn't provide public Internet access. If your function requires Internet access (for example, to access AWS services that don't have VPC endpoints), configure a Network Address Translation (NAT) instance inside your VPC or use an Amazon Virtual Private Cloud (Amazon VPC) NAT gateway. For more information, see NAT Gateways in the Amazon VPC User Guide.