I have a parameter "SecretKey" and I want to provide a default value to it (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html) and the default value would be a generated random string. I already have a lambda function to do the generation of the key and a custom resource (call it RandomSecretKey
) to get the value. Ultimately, I want to be able to do this in the parameters section:
"SecretKey": {
...
"Default": { "Fn::GetAtt": ["RandomSecretKey", "Value"] }
}
And this parameter would be referenced somewhere.
But this doesn't work because CloudFormation expects a static String based on the error message. Is there a way to do this?