interface ImageAttributes
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.ImageAttributes |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#ImageAttributes |
Java | software.amazon.awscdk.services.imagebuilder.alpha.ImageAttributes |
Python | aws_cdk.aws_imagebuilder_alpha.ImageAttributes |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป ImageAttributes |
Properties for an EC2 Image Builder image.
Example
// Import by name
const existingImageByName = imagebuilder.Image.fromImageName(
this,
'ExistingImageByName',
'my-existing-image'
);
// Import by ARN
const existingImageByArn = imagebuilder.Image.fromImageArn(
this,
'ExistingImageByArn',
'arn:aws:imagebuilder:us-east-1:123456789012:image/imported-image/1.0.0'
);
// Import by attributes
const existingImageByAttributes = imagebuilder.Image.fromImageAttributes(this, 'ExistingImageByAttributes', {
imageName: 'shared-base-image',
imageVersion: '2024.11.25'
});
// Grant permissions to imported images
const role = new iam.Role(this, 'ImageAccessRole', {
assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com')
});
existingImageByName.grantRead(role);
existingImageByArn.grant(role, 'imagebuilder:GetImage', 'imagebuilder:ListImagePackages');
Properties
| Name | Type | Description |
|---|---|---|
| image | string | The ARN of the image. |
| image | string | The name of the image. |
| image | string | The version of the image. |
imageArn?
Type:
string
(optional, default: derived from the imageName)
The ARN of the image.
imageName?
Type:
string
(optional, default: derived from the imageArn)
The name of the image.
imageVersion?
Type:
string
(optional, default: the latest version of the image, x.x.x)
The version of the image.

.NET
Go
Java
Python
TypeScript (