Skip to content

Commit

Permalink
AttachPrincipalPolicy > AttachPolicy
Browse files Browse the repository at this point in the history
Change deprecated AttachPrincipalPolicy to AttachPolicy
  • Loading branch information
gadget-man authored Aug 12, 2021
1 parent 0ef5042 commit 7020ecd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ func genCert(ctx context.Context, certType x509utils.CertType, useATCA bool, iot
}
}
ourutil.Reportf("Attaching policy %q to the certificate...", policy)
_, err := iotSvc.AttachPrincipalPolicy(&iot.AttachPrincipalPolicyInput{
_, err := iotSvc.AttachPolicy(&iot.AttachPolicyInput{
PolicyName: aws.String(AWSIoTPolicy),
Principal: ccResp.CertificateArn,
Target: ccResp.CertificateArn,
})
if err != nil {
return nil, nil, errors.Annotatef(err, "failed to attach policy")
Expand Down

0 comments on commit 7020ecd

Please sign in to comment.