# References and Signals

## Overview
[Section titled “Overview”](#overview)
Signals are static outputs exposed by blocks with lifecycles. Use signals in configuration expressions to create static dependencies between blocks.

## Blocks with lifecycles
[Section titled “Blocks with lifecycles”](#blocks-with-lifecycles)
Blocks with lifecycles manage stateful resources (infrastructure, persistent services) that exist beyond individual event executions. These blocks:

 - Create and manage external resources
 - Expose signals for referencing static properties
 - Have distinct lifecycle states
 - Require user confirmation for creation and modification

### Lifecycle States
[Section titled “Lifecycle States”](#lifecycle-states)
| State | Description |
| --- | --- |
| `DRAFT` | Block configured but resources not created |
| `IN_PROGRESS` | Resources being created or updated |
| `READY` | Resources live and signals available |
| `FAILED` | Resource creation or update failed |
| `DRAINING` | Resources being deleted |

### State Transitions
[Section titled “State Transitions”](#state-transitions)
**Creation Flow:**

`DRAFT → [user confirms] → IN_PROGRESS → READY`

**Update Flow (Sync):**

`READY → [config change] → IN_PROGRESS → READY`

**Deletion Flow:**

`READY → [user deletes] → DRAINING → [removed]`

## Signals
[Section titled “Signals”](#signals)
Signals are static properties exposed by blocks with lifecycles in `READY` state. Common signal types:

**AWS S3 Bucket:**

 - `arn` - Bucket ARN
 - `name` - Bucket name
 - `region` - AWS region

**SQS Queue:**

 - `url` - Queue URL
 - `arn` - Queue ARN

**API Gateway:**

 - `url` - Endpoint URL
 - `apiId` - API identifier

## signals Object
[Section titled “signals Object”](#signals-object)
### Syntax
[Section titled “Syntax”](#syntax)

**

```
signals.<camelCasedBlockName>.<signalName>
```

### Parameters
[Section titled “Parameters”](#parameters)
Single parameter with format `signals.<blockName>.<signalName>`:

 - **blockName**: Block name converted to camelCase (e.g., “My S3 Bucket” → `myS3Bucket`)
 - **signalName**: Signal identifier exposed by the block

### Usage Context
[Section titled “Usage Context”](#usage-context)
#### Examples
[Section titled “Examples”](#examples)
**Basic Signal Reference:**


**

```
// Block name: "Data Bucket", Signal: "arn"signals.dataBucket.arn
```

**Template String:**


**

```
// Block name: "API Endpoint"// Signal: "url"`${signals.apiEndpoint.url}/users`
```

**Multiple Signals:**


**

```
{  bucketArn: signals.dataBucket.arn,  region: signals.dataBucket.region}
```

## ref() vs outputs
[Section titled “ref() vs outputs”](#ref-vs-outputs)
| signals | outputs |
| --- | --- |
| References static signals | Accesses event data |
| Infrastructure properties | Dynamic per-event data |
| Doesn’t require event flow | Requires event connection |

## Configuration Dependencies
[Section titled “Configuration Dependencies”](#configuration-dependencies)
`signals` creates static configuration dependencies without requiring event flow connections:

![References](/images/references.png)

The S3 Bucket block doesn’t need an event connection to the Create Object block. The ‘signals’ object establishes the configuration dependency.