How can I update a stack parameter which was set by an SSM parameter?

0

I have an SSM parameter value set with a value I want to use in a CFN template. In the CFN template I have a parameter configured as follows:

Parameters:
  DDAPIKEY:
    Type: String
    Default: '{{resolve:ssm:DDAPIKEY:1}}' 

I then use this parameter as an environment variable in a lambda function. This works for the first deployment just fine, but if I change the SSM parameter value and redeploy the stack my expectation is that my lambda function would be updated. But given how CFN default parameters work (they only set the value the first time) I'm out of luck. Subsequent deployments do not update the environment variable even if the SSM parameter value is changed.

Am I mistaken about something or are there ways to work around this?

已提問 4 年前檢視次數 1448 次
1 個回答
0

Nevermind. I didn't realize you could use the {{resolve:ssm:DDAPIKEY:2}} notation in a parameter override. Since you can do that, then I have a workaround.

已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南