We model the production of complex goods in a large supply network. Each firm sources several essential inputs through relationships with other firms. Individual supply relationships are at risk of idiosyncratic failure, which threatens to disrupt production. To protect against this, firms multisource inputs and strategically invest to make relationships stronger, trading off the cost of investment against the benefits of increased robustness. We find that equilibrium aggregate production is robust to idiosyncratic disruptions. Nevertheless, there is a regime in which arbitrarily small systemic shocks cause arbitrarily steep drops in output, so that the the supply network is fragile. The endogenous configuration of supply networks provides a new channel for the powerful amplification of shocks.