Skip to content

Commit ea63b00

Browse files
authored
Merge pull request #64 from gadget-man/patch-1
AttachPrincipalPolicy > AttachPolicy
2 parents 0ef5042 + 7020ecd commit ea63b00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/aws/aws.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,9 @@ func genCert(ctx context.Context, certType x509utils.CertType, useATCA bool, iot
255255
}
256256
}
257257
ourutil.Reportf("Attaching policy %q to the certificate...", policy)
258-
_, err := iotSvc.AttachPrincipalPolicy(&iot.AttachPrincipalPolicyInput{
258+
_, err := iotSvc.AttachPolicy(&iot.AttachPolicyInput{
259259
PolicyName: aws.String(AWSIoTPolicy),
260-
Principal: ccResp.CertificateArn,
260+
Target: ccResp.CertificateArn,
261261
})
262262
if err != nil {
263263
return nil, nil, errors.Annotatef(err, "failed to attach policy")

0 commit comments

Comments
 (0)