aws / aws/aws-sam-cli

import existing resources into new stack

Open
#1,699 12 comments 63 reactions 0 assignees View on GitHub
area/deploy maintainer/need-followup type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

I wish SAM CLI could import existing CF resources as documented here: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-import-new-stack.html#resource-import-new-stack-cli

Specific use case: Destroying a stack leaves some persistent resources (e.g. a database) that could be incorporated into a new stack.

### Proposal

Add a `--resources-to-import` argument to `sam deploy`.

Contributor guide

Open the contributing guide

Research direction

Start with the `sam deploy` entry point and the AWS CloudFormation resource-import documentation linked in the issue. Trace how deploy arguments are parsed and passed to CloudFormation, then verify that `--resources-to-import` can incorporate persistent resources into a new stack without losing the existing resources.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cli, cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.