Amazon EC2 Image Builder Create Image API

The Create Image API from Amazon EC2 Image Builder — 1 operation(s) for create image.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).
Business capability
Continuous Integration Management BC-4210.10

Operations 1

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

PUT /CreateImage Create an AMI from a recipe · Create Image #
Ask an LLM
“How do I build a new AMI from an image recipe?”
“Can I enable enhanced image metadata and image scanning when creating an AMI?”
Tell an agent
Create an AMI from recipe {imageRecipeArn} on infrastructure {infrastructureConfigurationArn} with client token {clientToken}.
Build an AMI from container recipe {containerRecipeArn} using infrastructure {infrastructureConfigurationArn} and client token {clientToken}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-ec2-image-builder:amazon-ec2-image-builder-create-image-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-ec2-image-builder-create-image-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: EC2 Image Builder Create Image API
  version: '2019-12-02'
  description: Generated from AWS's published Smithy model for EC2 Image Builder. 1 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://imagebuilder.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /CreateImage:
    put:
      operationId: CreateImage
      summary: Create Image
      description: Creates a new image along with all configured output resources defined in the distribution configuration.
        You must specify exactly one recipe for your image, using either a containerRecipeArn or an imageRecipeArn. The response
        returns as soon as Image Builder creates the new image resource. The image build process runs asynchronously. To check
        its progress, call GetImage and check the image status.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateImageResponse'
              example:
                requestId: 62e9b43f-a9fd-4272-89fb-ce6235d07ab4
                clientToken: a1b2c3d4-5678-90ab-cdef-EXAMPLEeeeee
                imageBuildVersionArn: arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0/1
                latestVersionReferences:
                  latestVersionArn: arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/x.x.x
                  latestMajorVersionArn: arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.x.x
                  latestMinorVersionArn: arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.x
                  latestPatchVersionArn: arn:aws:imagebuilder:us-west-2:111122223333:image/my-example-recipe/1.0.0
        '429':
          description: CallRateLimitExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallRateLimitExceededException'
        '400':
          description: ClientException; IdempotentParameterMismatchException; InvalidRequestException; ResourceInUseException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientException'
        '403':
          description: ForbiddenException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenException'
        '500':
          description: ServiceException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceException'
        '402':
          description: ServiceQuotaExceededException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceQuotaExceededException'
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableException'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                imageRecipeArn:
                  type: string
                  description: The Amazon Resource Name (ARN) of the image recipe that defines how images are configured,
                    tested, and assessed. You must specify either this property or containerRecipeArn, but not both.
                containerRecipeArn:
                  type: string
                  description: The Amazon Resource Name (ARN) of the container recipe that defines how images are configured
                    and tested. You must specify either this property or imageRecipeArn, but not both.
                distributionConfigurationArn:
                  type: string
                  description: The Amazon Resource Name (ARN) of the distribution configuration that defines and configures
                    the outputs of the image build. If you don't specify a distribution configuration, Image Builder creates
                    the output image only in the account and Amazon Web Services Region where the build runs.
                infrastructureConfigurationArn:
                  type: string
                  description: The Amazon Resource Name (ARN) of the infrastructure configuration that defines the environment
                    in which your image will be built and tested.
                imageTestsConfiguration:
                  $ref: '#/components/schemas/ImageTestsConfiguration'
                enhancedImageMetadataEnabled:
                  type: boolean
                  description: Specifies whether to collect additional information about the image being created, including
                    the operating system (OS) version and package list. Defaults to true.
                tags:
                  type: object
                  additionalProperties:
                    type: string
                  description: The tags of the image.
                clientToken:
                  type: string
                  description: 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.
                imageScanningConfiguration:
                  $ref: '#/components/schemas/ImageScanningConfiguration'
                workflows:
                  type: array
                  items:
                    $ref: '#/components/schemas/WorkflowConfiguration'
                  description: The array of workflow configuration objects for the build. If you specify workflows, they replace
                    the default workflows that Image Builder otherwise runs for the build, and you must also provide an executionRole.
                executionRole:
                  type: string
                  description: The name or Amazon Resource Name (ARN) for the IAM role you create that grants Image Builder
                    access to perform workflow actions. This property is required if you specify workflows. If you don't provide
                    a role, Image Builder uses the Image Builder service-linked role in your account, and creates it if it
                    doesn't exist.
                loggingConfiguration:
                  $ref: '#/components/schemas/ImageLoggingConfiguration'
              required:
              - infrastructureConfigurationArn
              - clientToken
            example:
              imageRecipeArn: arn:aws:imagebuilder:us-west-2:111122223333:image-recipe/my-example-recipe/1.0.0
              infrastructureConfigurationArn: arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure
              clientToken: a1b2c3d4-5678-90ab-cdef-EXAMPLEeeeee
      tags:
      - Create Image
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: imagebuilder
  schemas:
    CallRateLimitExceededException:
      type: object
      properties:
        message:
          type: string
    ClientException:
      type: object
      properties:
        message:
          type: string
    CreateImageResponse:
      type: object
      properties:
        requestId:
          type: string
          description: The request ID that uniquely identifies this request.
        clientToken:
          type: string
          description: The client token that uniquely identifies the request.
        imageBuildVersionArn:
          type: string
          description: The Amazon Resource Name (ARN) of the image that the request created.
        latestVersionReferences:
          $ref: '#/components/schemas/LatestVersionReferences'
    EcrConfiguration:
      type: object
      properties:
        repositoryName:
          type: string
          description: The name of the container repository where Image Builder pushes the container image for the vulnerability
            scan. Provide the repository name only (a namespace path is allowed, but not the registry hostname); the repository
            must already exist in your account. If you don't specify a repository name, Image Builder creates the default
            repository image-builder-image-scanning-repository in your account.
        containerTags:
          type: array
          items:
            type: string
          description: Tags for Image Builder to apply to the output container image that Amazon Inspector scans. Tags can
            help you identify and manage your scanned images.
    ForbiddenException:
      type: object
      properties:
        message:
          type: string
    ImageLoggingConfiguration:
      type: object
      properties:
        logGroupName:
          type: string
          description: The log group name that Image Builder uses for image creation. If not specified, the log group name
            defaults to /aws/imagebuilder/image-name.
    ImageScanningConfiguration:
      type: object
      properties:
        imageScanningEnabled:
          type: boolean
          description: Specifies whether Amazon Inspector scans for vulnerabilities when you create a new image. You must
            also enable image tests. For AMI output, imageScanningTypes sets whether Amazon Inspector scans the test instance
            or the output AMI. For container output, Amazon Inspector scans the container image that Image Builder pushes
            to the Amazon ECR repository from your ecrConfiguration settings. To use container image scans, you must activate
            Amazon Inspector for Amazon ECR scanning in your account. The Image Builder ListImageScanFindings operation returns
            the findings of these scans.
        ecrConfiguration:
          $ref: '#/components/schemas/EcrConfiguration'
        imageScanningTypes:
          type: array
          items:
            type: string
            enum:
            - TEST_INSTANCE_CVE
            - ON_DEMAND_AMI_CVE
          description: 'The type of vulnerability scan that Image Builder runs for AMI output when imageScanningEnabled is
            true. Specify a single value. If you omit imageScanningTypes, Image Builder uses TEST_INSTANCE_CVE. The scan types
            work as follows: With TEST_INSTANCE_CVE, Amazon Inspector scans the test instance during image tests. To use this
            scan, you must activate Amazon Inspector for Amazon EC2 scanning in your account. The Image Builder ListImageScanFindings
            operation returns the findings. With ON_DEMAND_AMI_CVE, Amazon Inspector starts an on-demand scan of the output
            AMI during image tests. To use this sc'
        scanResultCondition:
          $ref: '#/components/schemas/ScanResultCondition'
    ImageTestsConfiguration:
      type: object
      properties:
        imageTestsEnabled:
          type: boolean
          description: Specifies whether tests run after building the image. When enabled, tests run after the image build
            and before image distribution. Defaults to true.
        timeoutMinutes:
          type: integer
          description: The maximum time in minutes that tests are permitted to run. If you don't specify a value, Image Builder
            stores and returns 720. The timeout property is not currently active. This value is ignored.
    LatestVersionReferences:
      type: object
      properties:
        latestVersionArn:
          type: string
          description: The latest version Amazon Resource Name (ARN) of the Image Builder resource.
        latestMajorVersionArn:
          type: string
          description: The latest version Amazon Resource Name (ARN) with the same major version of the Image Builder resource.
        latestMinorVersionArn:
          type: string
          description: The latest version Amazon Resource Name (ARN) with the same minor version of the Image Builder resource.
        latestPatchVersionArn:
          type: string
          description: The latest version Amazon Resource Name (ARN) with the same patch version of the Image Builder resource.
    ScanResultCondition:
      type: object
      properties:
        maximumSeverityLabel:
          type: string
          enum:
          - INFORMATIONAL
          - LOW
          - MEDIUM
          - HIGH
          description: The maximum severity allowed for findings on the output AMI. A finding above this severity fails the
            image, unless fixAvailable excludes it. Valid values are INFORMATIONAL, LOW, MEDIUM, and HIGH. A CRITICAL finding
            that counts always fails the image.
        fixAvailable:
          type: boolean
          description: Specifies whether only findings that have a fix available count toward maximumSeverityLabel. When false,
            Image Builder counts every finding. The default is true.
      required:
      - maximumSeverityLabel
    ServiceException:
      type: object
      properties:
        message:
          type: string
    ServiceQuotaExceededException:
      type: object
      properties:
        message:
          type: string
    ServiceUnavailableException:
      type: object
      properties:
        message:
          type: string
    WorkflowConfiguration:
      type: object
      properties:
        workflowArn:
          type: string
          description: The Amazon Resource Name (ARN) of the workflow resource.
        parameters:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowParameter'
          description: Contains parameter values for each of the parameters that the workflow document defined for the workflow
            resource.
        parallelGroup:
          type: string
          description: Test workflows are defined within named runtime groups called parallel groups. The parallel group is
            the named group that contains this test workflow. Test workflows within a parallel group can run at the same time.
            Image Builder starts up to five test workflows in the group at the same time, and starts additional workflows
            as others complete, until all workflows in the group have completed. This field only applies for test workflows.
        onFailure:
          type: string
          enum:
          - CONTINUE
          - ABORT
          description: The action to take if the workflow fails. With CONTINUE, a failed workflow is logged and image creation
            proceeds to the next workflow. If you don't set a value, the image build fails when the workflow fails. You can
            only set this property for test workflows.
      required:
      - workflowArn
    WorkflowParameter:
      type: object
      properties:
        name:
          type: string
          description: The name of the workflow parameter to set.
        value:
          type: array
          items:
            type: string
          description: Sets the value for the named workflow parameter.
      required:
      - name
      - value
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/imagebuilder/service/2019-12-02/imagebuilder-2019-12-02.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)