正如here所述,有一种方法可以使用 cloudformation 模板创建和部署堆栈。我不明白的是如何提供自定义参数,例如userPoolName
,autoVerifiedAttributes
或mfaConfiguration
。
我非常感谢你的帮助。

您将用于创建和部署堆栈的工具将公开此功能。
如果您使用的是 AWS CLI,则可以通过以下方式执行此操作:
aws cloudformation create-stack --stack-name startmyinstance
--template-body file://home/ec2-user/templates/startmyinstance.json
--parameters ParameterKey=KeyPairName,ParameterValue=MyKey ParameterKey=InstanceType,ParameterValue=t1.micro
要了解有关参数本身的更多信息,您可以参考 AWS Cloudformationdocs。
如果您使用的是 AWS Python SDK,Boto3,您可以将其作为参数访问,如下所示:
response = client.update_stack(
StackName='string',
Parameters=[
{
'ParameterKey': 'string',
'ParameterValue': 'string',
'UsePreviousValue': True|False,
'ResolvedValue': 'string'
},
],
)
在文档here中阅读更多关于此的信息。对于任何其他语言的 SDK 也是如此。
编辑 1:添加了 Python 示例-Boto3
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(23条)