Problem/Motivation

The validate function that checks credentials when submitted on the form calls the describeEndpoint method to test the credentials. When not using IOT this doesn't make sense as the endpoint is provided.

Proposed resolution

Update the validate function to instead create a StsClient client instead of IotClient, and use the getCallerIdentity method to test the credentials instead of the endpoint.

Comments

mikemadison created an issue. See original summary.

mikemadison’s picture

StatusFileSize
new1.47 KB
mikemadison’s picture

Status: Active » Needs review
pixlkat’s picture

This patch worked well for me -- the config form saves without error, and our IoT client is able to communicate normally.

My only comment about the patch is that if you are switching to the StsClient, you should be catching an Aws\Sts\Exception\StsException instead. The exception thrown if you enter invalid credentials on the form is not caught by the existing code.

gaurav_drupal’s picture

StatusFileSize
new1.55 KB
new760 bytes

Providing the updated patch with inter diff.
Please review.

mikemadison’s picture

Status: Needs review » Reviewed & tested by the community
mikemadison’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.