Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS::IoT::Certificate

Use the AWS::IoT::Certificate resource to declare an X.509 certificate.

For information about working with X.509 certificates, see Authentication in AWS IoT in the AWS IoT Developer Guide.

Syntax

JSON

Copy
{ "Type": "AWS::IoT::Certificate", "Properties": { "CertificateSigningRequest": String, "Status": String } }

YAML

Copy
Type: "AWS::IoT::Certificate" Properties: CertificateSigningRequest: String Status: String

Properties

CertificateSigningRequest

The certificate signing request (CSR).

Required: Yes

Type: String

Update requires: Replacement

Status

The status of the certificate.

Required: Yes

Type: String

Update requires: No interruption

Return Values

Ref

When you provide the logical ID of this resource to the Ref intrinsic function, Ref returns the certificate ID. For example:

Copy
{ "Ref": "MyCertificate" }
A value similar to the following is returned:
Copy
a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

Arn

Returns the Amazon Resource Name (ARN) for the instance profile. For example:

Copy
{ "Fn::GetAtt": ["MyCertificate", "Arn"] }

A value similar to the following is returned:

Copy
arn:aws:iot:ap-southeast-2:123456789012:cert/a1234567b89c012d3e4fg567hij8k9l01mno1p23q45678901rs234567890t1u2

For more information about using Fn::GetAtt, see Fn::GetAtt.

Example

The following example declares an X.509 certificate and its status.

JSON

Copy
{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "MyCertificate": { "Type": "AWS::IoT::Certificate", "Properties": { "CertificateSigningRequest": { "Ref": "CSRParameter" }, "Status": { "Ref": "StatusParameter" } } } }, "Parameters": { "CSRParameter": { "Type": "String" }, "StatusParameter": { "Type": "String" } } }

YAML

Copy
AWSTemplateFormatVersion: "2010-09-09" Resources: MyCertificate: Type: "AWS::IoT::Certificate" Properties: CertificateSigningRequest: Ref: "CSRParameter" Status: Ref: "StatusParameter" Parameters: CSRParameter: Type: "String" StatusParameter: Type: "String"