如何使用CloudFormation创建IoT x509证书?

0

【以下的问题经过翻译处理】 我正在尝试通过CloudFormation创建IoT x509证书,而不是通过AWS控制台。根据这个文档,cf模板需要"certificatePem"作为输入,我希望cf输出这个证书。

AWS CLI命令

aws iot create-keys-and-certificate \
--set-as-active \
--certificate-pem-outfile esp-certificate.crt \
--public-key-outfile esp-public.key \
--private-key-outfile esp-private.key \
--region ap-southeast-1

如何在CloudFormation中执行相同的操作?

profile picture
EXPERT
asked 6 months ago31 views
1 Answer
0

【以下的回答经过翻译处理】 你可以在这里查看使用CDK的示例:https://github.com/awslabs/aws-iot-greengrass-accelerators/tree/main/v2/base/cdk/lib/IotThingCertPolicy。

这是一个自定义资源结构,它创建证书和密钥(文档名称错误但正确)并将它们存储在系统管理器参数存储中。这与其他评论者的有效评论相一致。

由于规模较大,通常建议将物品和证书创建外部到CloudFormation中。车队提供可以帮助设备和凭证的接入。

profile picture
EXPERT
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions