AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::ImageBuilder::InfrastructureConfiguration

CfnInfrastructureConfiguration

Creates a new infrastructure configuration. An infrastructure configuration defines the environment in which your image will be built and tested.

Import

import { CfnInfrastructureConfiguration } from 'aws-cdk-lib/aws-imagebuilder';

Or use the module namespace:

import * as imagebuilder from 'aws-cdk-lib/aws-imagebuilder';
// imagebuilder.CfnInfrastructureConfiguration

Properties

Configuration passed to the constructor as CfnInfrastructureConfigurationProps.

instanceProfileNameRequired
string | IInstanceProfileRef

The instance profile to associate with the instance used to customize your Amazon EC2 AMI.

nameRequired
string

The name of the infrastructure configuration.

descriptionOptional
string

The description of the infrastructure configuration.

instanceMetadataOptionsOptional
IResolvable | InstanceMetadataOptionsProperty

The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances.

instanceTypesOptional
string[]

The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. The service will pick one of these instance types based on availability.

keyPairOptional
string

The key pair of the infrastructure configuration. You can use this to log on to and debug the instance used to create your image.

loggingOptional
IResolvable | LoggingProperty

The logging configuration of the infrastructure configuration.

placementOptional
IResolvable | PlacementProperty

The instance placement settings that define where the instances that are launched from your image will run.

resourceTagsOptional
{ [key: string]: string } | IResolvable

The metadata tags to assign to the Amazon EC2 instance that Image Builder launches during the build process. Tags are formatted as key value pairs.

securityGroupIdsOptional
string[]

The security group IDs to associate with the instance used to customize your Amazon EC2 AMI.

snsTopicArnOptional
string | ITopicRef

The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications. > EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.

subnetIdOptional
string

The subnet ID in which to place the instance used to customize your Amazon EC2 AMI.

tagsOptional
{ [key: string]: string }

The metadata tags to assign to the infrastructure configuration resource that Image Builder creates as output. Tags are formatted as key value pairs.

terminateInstanceOnFailureOptional
boolean | IResolvable

The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter