Skip to content

Updates an infrastructure configuration

Description

Updates an infrastructure configuration. An infrastructure configuration defines the environment in which Image Builder builds and tests your image.

This operation doesn't support selective updates. The request replaces the configuration, so include every setting that you want to keep. Omitted optional properties are cleared.

Usage

imagebuilder_update_infrastructure_configuration(
  infrastructureConfigurationArn, description, instanceTypes,
  instanceProfileName, securityGroupIds, subnetId, logging, keyPair,
  terminateInstanceOnFailure, snsTopicArn, resourceTags,
  instanceMetadataOptions, placement, clientToken)

Arguments

  • infrastructureConfigurationArn

    [required] The Amazon Resource Name (ARN) of the infrastructure configuration that you want to update.

  • description

    The description of the infrastructure configuration.

  • instanceTypes

    The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. Image Builder picks one of these instance types based on availability. If you don't specify instance types, Image Builder selects compatible instance types automatically. If you specify a Dedicated Host, Image Builder uses only instance types that the host supports.

  • instanceProfileName

    [required] The instance profile to associate with the instance used to customize your Amazon EC2 AMI. The instance profile must exist in your account.

  • securityGroupIds

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

  • subnetId

    The subnet ID in which to place the instance used to customize your Amazon EC2 AMI. If you specify subnetId, you must also specify one or more security group IDs in securityGroupIds. Otherwise, the request fails.

  • logging

    The logging configuration of the infrastructure configuration. When you configure S3 logs, Image Builder writes logs from the build and test process to the specified bucket under the key prefix.

  • keyPair

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

  • terminateInstanceOnFailure

    Specifies whether to terminate the instance on failure. 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. Defaults to true.

  • snsTopicArn

    The Amazon Resource Name (ARN) of the SNS topic to which Image Builder sends image build event notifications. Specify a standard topic. Image Builder doesn't support FIFO topics. Image Builder validates the topic when you create or update the configuration. You must have permission to publish to the topic.

    EC2 Image Builder can't send notifications to SNS topics that are encrypted using keys from other accounts. If your SNS topic is encrypted, the key must be owned by the same account that owns your Image Builder resources.

  • resourceTags

    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. Tag keys can't begin with aws: or match one of the following reserved keys: CreatedBy, Ec2ImageBuilderArn, Name, or Tags.

  • instanceMetadataOptions

    The instance metadata service (IMDS) settings that Image Builder applies to the EC2 build and test instances it launches during image creation. If you don't set these options, the EC2 launch defaults for the instance apply. For more information about instance metadata options, see one of the following links:

  • placement

    The instance placement settings that define where the build and test instances that Image Builder launches during image creation run. These settings don't affect instances that you launch from the output image.

  • clientToken

    [required] A unique, case-sensitive identifier you provide to ensure that the operation runs no more than one time. If you retry a request with the same client token, Image Builder returns the original response without running the operation again. For more information, see Ensuring idempotency in the Amazon EC2 API Reference.

Value

A list with the following syntax:

list(
  requestId = "string",
  clientToken = "string",
  infrastructureConfigurationArn = "string"
)

Request syntax

svc$update_infrastructure_configuration(
  infrastructureConfigurationArn = "string",
  description = "string",
  instanceTypes = list(
    "string"
  ),
  instanceProfileName = "string",
  securityGroupIds = list(
    "string"
  ),
  subnetId = "string",
  logging = list(
    s3Logs = list(
      s3BucketName = "string",
      s3KeyPrefix = "string"
    )
  ),
  keyPair = "string",
  terminateInstanceOnFailure = TRUE|FALSE,
  snsTopicArn = "string",
  resourceTags = list(
    "string"
  ),
  instanceMetadataOptions = list(
    httpTokens = "string",
    httpPutResponseHopLimit = 123
  ),
  placement = list(
    availabilityZone = "string",
    tenancy = "default"|"dedicated"|"host",
    hostId = "string",
    hostResourceGroupArn = "string"
  ),
  clientToken = "string"
)