Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Updating the CloudFormation stack via "sam deploy" gives an error "Update of resource type is not permitted" #6786

Closed
bbs-md opened this issue Mar 6, 2024 · 2 comments
Labels
blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days

Comments

@bbs-md
Copy link

bbs-md commented Mar 6, 2024

Description:

Deployed the project with resource Type: AWS::SNS::Topic

Change type AWS::SNS::Topic -> AWS::SQS::Queue (template.yaml) and update stack via

sam update

I got an error

Error: Failed to create changeset for the stack: incoming-email-processing-bug, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression "Status" we matched expected path: "FAILED" Status: FAILED. Reason: Update of resource type is not permitted. The new template modifies resource type of the following resources: [IncomingEmailLambdaDLQ]

Steps to reproduce:

Create a project with AWS::SNS::Topic resource and deploy it. In the template.yaml, change the resource type AWS::SNS::Topic -> AWS::SQS::Queue. Deploy updates

sam deploy

Observed result:

Got the result in the terminal
Error: Failed to create changeset for the stack: incoming-email-processing-bug, ex: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state: For expression "Status" we matched expected path: "FAILED" Status: FAILED. Reason: Update of resource type is not permitted. The new template modifies resource type of the following resources: [IncomingEmailLambdaDLQ]

Expected result:

Updated CloudFormation stack.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Manjaro Linux x86_64
    Host: Virtual Machine Hyper-V UEFI Release v4.0
    Kernel: 6.1.77-2-MANJARO
  2. sam --version: SAM CLI, version 1.110.0
  3. AWS region: eu-west-1
{
  "version": "1.110.0",
  "system": {
    "python": "3.11.0",
    "os": "Linux-6.1.77-2-MANJARO-x86_64-with-glibc2.39"
  },
  "additional_dependencies": {
    "docker_engine": "25.0.2",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}
@bbs-md bbs-md added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Mar 6, 2024
@sidhujus
Copy link
Contributor

sidhujus commented Mar 6, 2024

Hi @bbs-md , thanks for reaching out. I checked and this does look to be the intended behaviour from CloudFormation when trying to change the resource type of an existing SnsTopic resource. You should be able to work around this by changing the name of the resource so that it recognizes the queue as a new resource.

@sidhujus sidhujus added blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Mar 6, 2024
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/close-if-inactive Blocked for >14 days with no response, will be closed if still inactive after 7 days
Projects
None yet
Development

No branches or pull requests

3 participants