Skip to content

Conversation

@tarunb12
Copy link
Contributor

Issue

aws/aws-cdk-rfcs#789

Reason for this change

This change adds a new alpha module for EC2 Image Builder L2 Constructs (@aws-cdk/aws-imagebuilder-alpha), as outlined in aws/aws-cdk-rfcs#789. This PR specifically implements the Workflow construct.

Description of changes

This change implements the Workflow construct, which is a higher-level construct of CfnWorkflow.

Example

const workflow = new imagebuilder.Workflow(this, 'Workflow', {
  workflowName: 'custom-build-workflow',
  workflowType: imagebuilder.WorkflowType.BUILD,
  workflowVersion: '1.0.0',
  description: 'A test workflow',
  changeDescription: 'Initial version',
  kmsKey: kms.Key.fromLookup(this, 'WorkflowKey', { aliasName: 'alias/workflow-encryption-key' }),
  // Workflow to create an AMI from an existing EC2 instance
  data: imagebuilder.WorkflowData.fromJsonObject({
    name: 'custom-build-workflow',
    description: 'Workflow to build an AMI from an EC2 instance',
    schemaVersion: imagebuilder.WorkflowSchemaVersion.V1_0,
    parameters: [
      {
        name: 'instanceId',
        type: imagebuilder.WorkflowParameterType.STRING
      }
    ],
    steps: [
      {
        name: 'CreateOutputAMI',
        action: imagebuilder.WorkflowAction.CREATE_IMAGE,
        onFailure: imagebuilder.WorkflowOnFailure.ABORT,
        inputs: { 'instanceId': 'i-123' }
      },
      {
        name: 'TerminateBuildInstance',
        action: imagebuilder.WorkflowAction.TERMINATE_INSTANCE,
        onFailure: imagebuilder.WorkflowOnFailure.CONTINUE,
        inputs: { 'instanceId': 'i-123' }
      }
    ],
    outputs: [{ name: 'ImageId', value: 'ami-123' }]
  })
});

Describe any new or updated permissions being added

N/A - new L2 construct in alpha module

Description of how you validated changes

Validated with unit tests and integration tests. Manually verified generated CFN templates as well.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team November 11, 2025 09:26
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 labels Nov 11, 2025
@tarunb12 tarunb12 marked this pull request as ready for review November 11, 2025 09:30
@aws-cdk-automation aws-cdk-automation added the pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes. label Nov 11, 2025
@ozelalisen ozelalisen self-assigned this Nov 12, 2025
Copy link
Member

@ozelalisen ozelalisen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the first round of comments

@ozelalisen ozelalisen changed the title feat(imagebuilder): add support for EC2 Image Builder L2 Constructs - Workflow feat(imagebuilder-alpha): add support for Workflow Construct Nov 13, 2025
@mergify mergify bot dismissed ozelalisen’s stale review November 14, 2025 21:55

Pull request has been modified.

@tarunb12 tarunb12 force-pushed the imagebuilder-workflow branch from 5583e13 to 0c25541 Compare November 15, 2025 01:05
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 15, 2025
@tarunb12 tarunb12 force-pushed the imagebuilder-workflow branch from b6158eb to 9452854 Compare November 15, 2025 17:01
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 17, 2025
@mergify mergify bot dismissed ozelalisen’s stale review November 17, 2025 15:14

Pull request has been modified.

@tarunb12 tarunb12 force-pushed the imagebuilder-workflow branch from 1b1662d to 5ab2f34 Compare November 18, 2025 01:52
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 18, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Nov 18, 2025
@tarunb12 tarunb12 force-pushed the imagebuilder-workflow branch 3 times, most recently from ab0ee69 to a9f8153 Compare November 20, 2025 15:08
@tarunb12 tarunb12 requested a review from ozelalisen November 20, 2025 16:30
@ozelalisen ozelalisen added the pr/request-cli-integ-tests Request CLI integ tests to be run. You will need to review the code and approve the deployment. label Nov 20, 2025
@aws-cdk-automation
Copy link
Collaborator

➡️ PR build request submitted to test-main-pipeline ⬅️

A maintainer must now check the pipeline and add the pr-linter/cli-integ-tested label once the pipeline succeeds.

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2025

This pull request has been removed from the queue for the following reason: pull request dequeued.

Pull request #36007 has been dequeued. The pull request could not be merged. This could be related to an activated branch protection or ruleset rule that prevents us from merging. (details: 2 of 2 required status checks have not succeeded: .).

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@ozelalisen ozelalisen removed the pr/request-cli-integ-tests Request CLI integ tests to be run. You will need to review the code and approve the deployment. label Nov 21, 2025
@ozelalisen
Copy link
Member

@Mergifyio requeue

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Nov 21, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 616d32a into aws:main Nov 21, 2025
18 of 20 checks passed
@github-actions
Copy link
Contributor

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2 pr/needs-further-review PR requires additional review from our team specialists due to the scope or complexity of changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants