import { ECRDeployment } from 'cdk-ecr-deployment'
new ECRDeployment(scope: Construct, id: string, props: ECRDeploymentProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
ECRDeploymentProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: ECRDeploymentProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
addToPrincipalPolicy |
No description. |
public toString(): string
Returns a string representation of this construct.
public addToPrincipalPolicy(statement: PolicyStatement): AddToPrincipalPolicyResult
- Type: aws-cdk-lib.aws_iam.PolicyStatement
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { ECRDeployment } from 'cdk-ecr-deployment'
ECRDeployment.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
import { ECRDeploymentProps } from 'cdk-ecr-deployment'
const eCRDeploymentProps: ECRDeploymentProps = { ... }
Name | Type | Description |
---|---|---|
dest |
IImageName |
The destination of the docker image. |
src |
IImageName |
The source of the docker image. |
buildImage |
string |
Image to use to build Golang lambda for custom resource, if download fails or is not wanted. |
environment |
{[ key: string ]: string} |
The environment variable to set. |
lambdaHandler |
string |
The name of the lambda handler. |
lambdaRuntime |
aws-cdk-lib.aws_lambda.Runtime |
The lambda function runtime environment. |
memoryLimit |
number |
The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket. |
role |
aws-cdk-lib.aws_iam.IRole |
Execution role associated with this function. |
securityGroups |
aws-cdk-lib.aws_ec2.SecurityGroup[] |
The list of security groups to associate with the Lambda's network interfaces. |
vpc |
aws-cdk-lib.aws_ec2.IVpc |
The VPC network to place the deployment lambda handler in. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
Where in the VPC to place the deployment lambda handler. |
public readonly dest: IImageName;
- Type: IImageName
The destination of the docker image.
public readonly src: IImageName;
- Type: IImageName
The source of the docker image.
public readonly buildImage: string;
- Type: string
- Default: public.ecr.aws/sam/build-go1.x:latest
Image to use to build Golang lambda for custom resource, if download fails or is not wanted.
Might be needed for local build if all images need to come from own registry.
Note that image should use yum as a package manager and have golang available.
public readonly environment: {[ key: string ]: string};
- Type: {[ key: string ]: string}
The environment variable to set.
public readonly lambdaHandler: string;
- Type: string
- Default: bootstrap
The name of the lambda handler.
public readonly lambdaRuntime: Runtime;
- Type: aws-cdk-lib.aws_lambda.Runtime
- Default: lambda.Runtime.PROVIDED_AL2023
The lambda function runtime environment.
public readonly memoryLimit: number;
- Type: number
- Default: 512
The amount of memory (in MiB) to allocate to the AWS Lambda function which replicates the files from the CDK bucket to the destination bucket.
If you are deploying large files, you will need to increase this number accordingly.
public readonly role: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
- Default: A role is automatically created
Execution role associated with this function.
public readonly securityGroups: SecurityGroup[];
- Type: aws-cdk-lib.aws_ec2.SecurityGroup[]
- Default: If the function is placed within a VPC and a security group is not specified, either by this or securityGroup prop, a dedicated security group will be created for this function.
The list of security groups to associate with the Lambda's network interfaces.
Only used if 'vpc' is supplied.
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
- Default: None
The VPC network to place the deployment lambda handler in.
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: the Vpc default strategy if not specified
Where in the VPC to place the deployment lambda handler.
Only used if 'vpc' is supplied.
- Implements: IImageName
import { DockerImageName } from 'cdk-ecr-deployment'
new DockerImageName(name: string, creds?: string)
Name | Type | Description |
---|---|---|
name |
string |
No description. |
creds |
string |
The credentials of the docker image. |
- Type: string
- Type: string
The credentials of the docker image.
Format user:password
or AWS Secrets Manager secret arn
or AWS Secrets Manager secret name
Name | Type | Description |
---|---|---|
uri |
string |
The uri of the docker image. |
creds |
string |
The credentials of the docker image. |
public readonly uri: string;
- Type: string
The uri of the docker image.
The uri spec follows https://github.com/containers/skopeo
public readonly creds: string;
- Type: string
The credentials of the docker image.
Format user:password
or AWS Secrets Manager secret arn
or AWS Secrets Manager secret name
- Implements: IImageName
import { S3ArchiveName } from 'cdk-ecr-deployment'
new S3ArchiveName(p: string, ref?: string, creds?: string)
Name | Type | Description |
---|---|---|
p |
string |
No description. |
ref |
string |
No description. |
creds |
string |
The credentials of the docker image. |
- Type: string
- Type: string
- Type: string
The credentials of the docker image.
Format user:password
or AWS Secrets Manager secret arn
or AWS Secrets Manager secret name
Name | Type | Description |
---|---|---|
uri |
string |
The uri of the docker image. |
creds |
string |
The credentials of the docker image. |
public readonly uri: string;
- Type: string
The uri of the docker image.
The uri spec follows https://github.com/containers/skopeo
public readonly creds: string;
- Type: string
The credentials of the docker image.
Format user:password
or AWS Secrets Manager secret arn
or AWS Secrets Manager secret name
- Implemented By: DockerImageName, S3ArchiveName, IImageName
Name | Type | Description |
---|---|---|
uri |
string |
The uri of the docker image. |
creds |
string |
The credentials of the docker image. |
public readonly uri: string;
- Type: string
The uri of the docker image.
The uri spec follows https://github.com/containers/skopeo
public readonly creds: string;
- Type: string
The credentials of the docker image.
Format user:password
or AWS Secrets Manager secret arn
or AWS Secrets Manager secret name