简体   繁体   English

Cloudformation 模板更新而不删除现有堆栈和资源?

[英]Cloudformation template update without deleting the existing stack and resources?

I have created a stack with multiple resources such as s3 , dynamodb ,lambda functions.我创建了一个包含多种资源的堆栈,例如 s3 、 dynamodb 、 lambda 函数。 I am trying to update the stack with the same environment, but the resources names of both the stacks are same such as "dynamodb_cust_data_dev" .我正在尝试使用相同的环境更新堆栈,但是两个堆栈的资源名称相同,例如 "dynamodb_cust_data_dev" 。

I always get an error that this xyz resource already exists with the same name.我总是收到此 xyz 资源已存在同名的错误。 Stack creation failed堆栈创建失败

client_variable_mapping_dev already exists in stack arn:aws:cloudformation:ap-south-1:505xxxxxxx:stack/dev-test/f7f1af20-e199-11ec-b2be-061b20ab09f2 client_variable_mapping_dev 已存在于堆栈 arn:aws:cloudformation:ap-south-1:505xxxxxxx:stack/dev-test/f7f1af20-e199-11ec-b2be-061b20ab09f2

Is it possible that the new stack overwrites the old resources which have the same names?新堆栈是否有可能覆盖具有相同名称的旧资源?

Is it possible that the new stack overwrites the old resources which have the same names?新堆栈是否有可能覆盖具有相同名称的旧资源?

No. Your deployment will just fail.不,您的部署将失败。 You must use different names, or just let CloudFormation generate random name for your resources.您必须使用不同的名称,或者只是让 CloudFormation 为您的资源生成随机名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM