fugue [global options] kill [options] <alias | FID>


Global options are detailed here.

Execute a “dry-run” of a process kill (output plan of operations). The dry-run flag allows you to see how AWS will provision your infrastructure in a composition using run, update, resume, or kill without actually executing the command. The Fugue CLI outputs a YAML plan of the create, modify, and delete actions that would be executed on your infrastructure, allowing you to preview the changes before you make them.
Emit output as JSON. The JSON flag displays command output in JSON format, which is useful for automation.
-y | --yes
Suppress confirmation dialogs. The yes flag suppresses confirmation dialogs and bypasses interactive prompts by providing input to aid scripting.
-h | --help
Show help text. The help flag is available throughout the CLI in both an application-level and command-level context. It enables a user to view help text for any command within the Fugue CLI.


The kill command ends automatic maintenance and enforcement of the resources that represent a single running instance of a composition, or process, and then it destroys those resources (and only those resources).

When you run a composition, Fugue uses the AWS API to launch the composition’s declared resources and automatically maintains and enforces them. These resources collectively represent a single running instance of the composition, which is called a process. This process is assigned a unique identifier called a Fugue ID, or FID and can also be assigned an alias, created by the user.

When you kill a single running instance of a composition (the process) by executing fugue kill [FID or alias], Fugue first stops automatically maintaining and enforcing the process’s resources, and then it deletes the process’s resources.

The length of time it takes Fugue to fully kill a process depends on the number of resources that the process created. Fugue deletes the resources in an order that satisfies their dependencies.

The kill command closes once the command to kill a process has been accepted by the Fugue Conductor. The actual process kill activities do take some time in most cases. To check the status of a process killing operation, use the status command. If a FID’s state is reported as “Killing,” then the kill command is still in progress. If the FID is no longer listed in the status table, then kill has successfully completed.

Killing one running instance of a composition (“process”) does not affect any other processes, even if the other processes are instantiations of the same original composition. However, if resources in another process are dependent on infrastructure in the killed process, that dependency may be unmet.

The kill command does not stop the Fugue Conductor or destroy its infrastructure. If you want to terminate your Fugue Conductor, see the uninstall command.


Using Suspend to Cancel a Kill

You may cancel a kill by first suspending the desired process and then resuming it.

To suspend the kill:

  1. Execute fugue suspend -y TARGET as soon as possible, where TARGET is the FID or alias of the desired process.
  2. Confirm that the process is in Suspended state by executing fugue status.

From here, you have two options:

  • To cancel the kill and return the process to Running state:

Execute fugue resume -y TARGET.

  • To continue the kill and return the process to Killing state:

Execute fugue kill -y TARGET.

Note: The -y flag is included in this example to save time by suppressing warnings.

Using --dry-run To Preview kill Changes To Your Infrastructure

In Fugue, a dry-run attempts to test an action through progressive parts of the system, returning either failures encountered, or the expected results of success. This allows you to see how Fugue will provision your infrastructure in a composition using run, update, resume, or kill without actually executing the command. You can see this in the output of a dry-run, which is a report describing the create, modify, and delete actions that would be executed on your infrastructure.

Some update operations are mutative, meaning the resource can be changed with “modify” actions, and some update operations are destructive, meaning the resource must be destroyed and created anew with “delete” and “create” actions. You can often determine whether an update is mutative or destructive based on the RequestType in the dry-run document.

Say you have a running instance of the vpc-only.lw composition:


import Fugue.AWS as AWS
       Fugue.AWS.EC2 as EC2

my-example-vpc: {
  cidrBlock: "",
  tags: [],
  instanceTenancy: EC2.DefaultTenancy,
  region: AWS.Us-west-2,
  dhcpOptions: None

You can use the --dry-run flag with the kill command to see what AWS resources would be destroyed.

$ fugue kill <FID | alias> --dry-run

The CLI asks Fugue to dry-run the kill command on the running composition, and then returns a parsable YAML report that looks something like this:

FID:   0b5df338-8e5d-45f2-9fc5-28fbb7ab29cd
JobId: '1500925421'

  - aws.ec2.delete_dhcp_options:
      Region: us-west-2
        DhcpOptionsId: dopt-7b39301c

  - aws.ec2.delete_vpc:
      Region: us-west-2
        VpcId: vpc-2b3dee4d

The output is organized by AWS API requests that the Conductor would make if the kill command was executed without --dry-run. In this case, there would be two calls:

  • A call to delete the VPC with the ID vpc-88ad5aee in the us-west-2
  • A call to delete the DHCP options set with the ID dopt-5b1a3f3c in us-west-2

Each request is listed with its region and parameters, which vary depending on the type of request.

You can also request the dry-run output as JSON by using the --json flag, which shows more detail. That would look like this:

    "fid": "0b5df338-8e5d-45f2-9fc5-28fbb7ab29cd",
    "job_id": "1500929205",
    "requests": [
            "guid": "0b5df338-8e5d-45f2-9fc5-28fbb7ab29cd.78a97f43-4a46-5ca0-9c91-75e232efd1ce",
            "params": {
                "DhcpOptionsId": "dopt-7b39301c"
            "region": "us-west-2",
            "request_type": "aws.ec2.delete_dhcp_options"
            "guid": "0b5df338-8e5d-45f2-9fc5-28fbb7ab29cd.636cfe20-9379-5066-9286-ee63acbd4c49",
            "params": {
                "VpcId": "vpc-2b3dee4d"
            "region": "us-west-2",
            "request_type": "aws.ec2.delete_vpc"

The request_type field describes each AWS API call the Conductor would make if the kill command was executed without --dry-run.

JSON Object Fields in a Dry-Run

Unique ID for the dry-run operation
Array of params, guid, guidMap, region, request_type per each API request in the dry-run operation
Dictionary of arguments passed to the AWS API in order to create, modify, or delete the resources
Globally unique ID for the resource being acted upon. NOTE: guid is not unique for resource properties (e.g., tags, security group rules, routes)
A unique token that maps to the guid and resource reference string
AWS region; see list of valid codes in AWS docs
Type of request for an AWS API action in aws.service.action_resource format
Fugue ID, or the process’s unique identifier

Using kill On A Nonexistent FID or Alias

If you run fugue kill <alias | FID> but the provided FID or alias does not match a currently running process Fugue displays an error message indicating that the alias does not exist and recommends running fugue status to view the available Fugue processes.

$ fugue kill 19X6f116-474a-41ed-81e7-5c5dbd0fe24d

[ fugue kill ] Killing  process with Alias:19X6f116-474a-41ed-81e7-5c5dbd0fe24d

[ Error ] No process with Alias: 19X6f116-474a-41ed-81e7-5c5dbd0fe24d could be found. Run the 'fugue status' command to view available Fugue processes.