interface CodeConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.CodeConfig |
Java | software.amazon.awscdk.services.lambda.CodeConfig |
Python | aws_cdk.aws_lambda.CodeConfig |
TypeScript (source) | @aws-cdk/aws-lambda » CodeConfig |
Obtainable from
Asset
.bind()
, Asset
.bind()
, Cfn
.bind()
, Code
.bind()
, Ecr
.bind()
, Inline
.bind()
, S3
.bind()
Result of binding Code
into a Function
.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as lambda from '@aws-cdk/aws-lambda';
const codeConfig: lambda.CodeConfig = {
image: {
imageUri: 'imageUri',
// the properties below are optional
cmd: ['cmd'],
entrypoint: ['entrypoint'],
workingDirectory: 'workingDirectory',
},
inlineCode: 'inlineCode',
s3Location: {
bucketName: 'bucketName',
objectKey: 'objectKey',
// the properties below are optional
objectVersion: 'objectVersion',
},
};
Properties
Name | Type | Description |
---|---|---|
image? | Code | Docker image configuration (mutually exclusive with s3Location and inlineCode ). |
inline | string | Inline code (mutually exclusive with s3Location and image ). |
s3 | Location | The location of the code in S3 (mutually exclusive with inlineCode and image ). |
image?
Type:
Code
(optional, default: code is not an ECR container image)
Docker image configuration (mutually exclusive with s3Location
and inlineCode
).
inlineCode?
Type:
string
(optional, default: code is not inline code)
Inline code (mutually exclusive with s3Location
and image
).
s3Location?
Type:
Location
(optional, default: code is not an s3 location)
The location of the code in S3 (mutually exclusive with inlineCode
and image
).