On initial setup, after providing the required AWS Connector Credentials and saving the config form getting following error.
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: Missing required client configuration options:
region: (string)
A "region" configuration value is required for the "iot" service
(e.g., "us-west-2"). A list of available public regions and endpoints can be
found at http://docs.aws.amazon.com/general/latest/gr/rande.html. in <em class="placeholder">Aws\ClientResolver->throwRequired()</em> (line <em class="placeholder">377</em> of <em class="placeholder">/var/www/newell/vendor/aws/aws-sdk-php/src/ClientResolver.php</em>). <pre class="backtrace">Aws\ClientResolver->resolve(Array, Object) (Line: 166)
Aws\AwsClient->__construct(Array) (Line: 117)
Drupal\aws_connector\Credentials\AWSCredentialProvider::validateCredentials('AKIAI7WVQBD574QSWFCQ', 'KIAI7WVQBD574QSWFCQ.X5VQKgmTSw2Awq0SP2wYq5LEhGd4thTDgbWg45sx') (Line: 90)
Drupal\aws_connector\Form\AWSConnectorForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 275)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'aws_connector_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('aws_connector_form', Array, Object) (Line: 575)
Drupal\Core\Form\FormBuilder->processForm('aws_connector_form', Array, Object) (Line: 318)
Drupal\Core\Form\FormBuilder->buildForm('aws_connector_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 51)
Drupal\jsonapi\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 99)
Drupal\shield\ShieldMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 669)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
</pre>
Although, the AWS Region value was present on the form.
However, while validating the credentials, following always returns NULL as the config for region(aws_region) was not set during module install.
return $aws_connector_config->get('aws_connector.' . $key);
As the AWS Region is required, the default config should be set when module gets installed.
Comments
Comment #2
gaurav_drupalAttaching patch.
Comment #3
gaurav_drupalComment #5
mikemadison commentedComment #6
mikemadison commented