I am trying to create an AWS IoT Thing using Serverless Framework. Following is my YAML file for the same.
I am getting "Error occurred during operation 'Invalid certificate resource configuration'..".
Any clue what the issue can be?
service: winds-delivery-infra
provider:
name: aws
runtime: nodejs12.x
stage: dev
region: ap-south-1
functions:
hello:
handler: handler.hello
resources:
Resources:
IoTThing:
Type: AWS::IoT::Thing
IoTPolicy:
Type: AWS::IoT::Policy
Properties:
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action: ["iot:Connect"]
Resource: "*"
- Effect: "Allow"
Action: ["iot:Publish","iot:Subscribe","iot:Receive"]
Resource: "*"
IoTCertificate:
Type: AWS::IoT::Certificate
Properties:
Status: "ACTIVE"
PolicyPrincipalAttachmentCert:
Type: AWS::IoT::PolicyPrincipalAttachment
Properties:
PolicyName:
Ref: IoTPolicy
Principal: { Fn::GetAtt: [IoTCertificate, Arn] }