get Function
The `AWS::Lambda::Function`
resource creates a Lambda function. To create a function, you need a deployment package and an execution role. The deployment package is a .zip file archive or container image that contains your function code. The execution role grants the function permission to use AWS services, such as Amazon CloudWatch Logs for log streaming and AWS X-Ray for request tracing. You set the package type to `Image`
if the deployment package is a container image. For these functions, include the URI of the container image in the ECR registry in the ImageUri property of the Code property. You do not need to specify the handler and runtime properties. You set the package type to `Zip`
if the deployment package is a .zip file archive. For these functions, specify the S3 location of your .zip file in the `Code`
property. Alternatively, for Node.js and Python functions, you can define your function inline in the ZipFile property of the Code property. In both cases, you must also specify the handler and runtime properties. You can use code signing if your deployment package is a .zip file archive. To enable code signing for this function, specify the ARN of a code-signing configuration. When a user attempts to deploy a code package with `UpdateFunctionCode`
, Lambda checks that the code package has a valid signature from a trusted publisher. The code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function. When you update a `AWS::Lambda::Function`
resource, CFNshort calls the UpdateFunctionConfiguration and UpdateFunctionCodeLAM APIs under the hood. Because these calls happen sequentially, and invocations can happen between these calls, your function may encounter errors in the time between the calls. For example, if you remove an environment variable, and the code that references that environment variable in the same CFNshort update, you may see invocation errors related to a missing environment variable. To work around this, you can invoke your function against a version or alias by default, rather than the `$LATEST`
version. Note that you configure provisioned concurrency on a `AWS::Lambda::Version`
or a `AWS::Lambda::Alias`
. For a complete introduction to Lambda functions, see What is Lambda? in the Lambda developer guide.
Return
null
Parameters
null
Return
null
Parameters
The name of the Lambda function, up to 64 characters in length. If you don't specify a name, CFN generates one. If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
See also
Return
null
Parameters
Builder for com.pulumi.awsnative.lambda.kotlin.inputs.GetFunctionPlainArgs.