AWS EC2 Integration with simplifier

  • Ritesh Kumar
        Has successfully completed the online course Basics (100)
      11 months ago #42132

      Hi Team,
      I am using GET endpoint to get the EC2 instance using Query parameter named (DescribeInstances Action in this case) but not able to connect from simplifier but with postman i am able to connect.

      Facing authorization error. also added authorization in simplifier connector in header but still the same error.
      Is there any way to authorize or connect to AWS EC2 in simplifier.

      This is the response i got from simplifier
      {
      “error”:”The Http request was not successful due to the client error: [401: Unauthorized – Authentication is possible but has failed or not yet been provided.] Response: <?xml version=\”1.0\” encoding=\”UTF-8\”?>
      <Response><Errors><Error>AuthFailure<Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>7f1e81f1-717c-4e56-b6cc-29004d5e29cb</RequestID></Response>”,
      “parameters”:{
      “XAmzDate”:{
      “dataType”:”String”,
      “value”:”20231219T043753Z”
      },
      “Version”:{
      “dataType”:”String”,
      “const”:”2016-11-15″
      },
      “verb”:{
      “dataType”:”String”,
      “const”:”GET”
      },
      “Authorization”:{
      “dataType”:”String”,
      “value”:”AWS4-HMAC-SHA256 Credential=AKIA5EON7XXXXXXFX7HK/20231219/ap-south-1/ec2/aws4_request, SignedHeaders=host;x-amz-date, Signature=f4417e730e05adXXXXXXb79e77f5740d8256b808d526ffa522ffba4fe51a02b”
      },
      “Action”:{
      “dataType”:”String”,
      “const”:”DescribeInstances”
      }
      },
      “customDetails”:{
      “Protocol”:”HTTP/1.1″,
      “Status-Code”:401,
      “Headers”:{
      “Server”:”AmazonEC2″,
      “Strict-Transport-Security”:”max-age=31536000; includeSubDomains”,
      “Cache-Control”:”no-cache, no-store”,
      “Date”:”Tue, 19 Dec 2023 04:43:53 GMT”,
      “x-amzn-RequestId”:”7f1e81f1-717c-4e56-b6cc-29004d5e29cb”,
      “vary”:”accept-encoding”
      },
      “Content-Type”:”text/xml; charset=UTF-8″,
      “Entity”:”‘∞'”,
      “Body”:”HttpEntity.Strict(text/plain; charset=UTF-8,<?xml version=\”1.0\” encoding=\”UTF-8\”?>
      <Response><Errors><Error>AuthFailure<Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>7f1e81f1-717c-4e56-b6cc-29004d5e29cb</RequestID></Response>)”
      },
      “stacktrace”:”com.itizzimo.appServer.connector.ConnectorType$ConnectorExecutionException: The Http request was not successful due to the client error: [401: Unauthorized – Authentication is possible but has failed or not yet been provided.] Response: <?xml version=\”1.0\” encoding=\”UTF-8\”?>
      <Response><Errors><Error>AuthFailure<Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>7f1e81f1-717c-4e56-b6cc-29004d5e29cb</RequestID></Response>
      at com.itizzimo.appServer.connector.types.rest.operations.stepsExecute.RESTStepExecuteRequest.com$itizzimo$appServer$connector$types$rest$operations$stepsExecute$RESTStepExecuteRequest$$toFailure(RESTStepExecuteRequest.scala:110)
      at com.itizzimo.appServer.connector.types.rest.operations.stepsExecute.RESTStepExecuteRequest$$anonfun$handleHttpErrors$1.applyOrElse(RESTStepExecuteRequest.scala:92)
      at com.itizzimo.appServer.connector.types.rest.operations.stepsExecute.RESTStepExecuteRequest$$anonfun$handleHttpErrors$1.applyOrElse(RESTStepExecuteRequest.scala:90)
      at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.applyExecRecovery(ConnectorExecutionContext.scala:215)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:144)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalIntermediate(ConnectorExecutionContext.scala:164)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:141)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalIntermediate(ConnectorExecutionContext.scala:164)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:141)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalRecoveryIntermediate(ConnectorExecutionContext.scala:168)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:146)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalIntermediate(ConnectorExecutionContext.scala:164)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:141)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalIntermediate(ConnectorExecutionContext.scala:164)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:141)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalIntermediate(ConnectorExecutionContext.scala:164)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:141)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalRecoveryIntermediate(ConnectorExecutionContext.scala:168)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:146)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evalIntermediate(ConnectorExecutionContext.scala:164)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecutionImpl(ConnectorExecutionContext.scala:141)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecution(ConnectorExecutionContext.scala:110)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionContext.evaluateExecution$(ConnectorExecutionContext.scala:106)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionRunner.evaluateExecution(ConnectorExecutionRunner.scala:24)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionRunner$$anonfun$receive$1.applyOrElse(ConnectorExecutionRunner.scala:39)
      at akka.actor.Actor.aroundReceive(Actor.scala:514)
      at akka.actor.Actor.aroundReceive$(Actor.scala:512)
      at com.itizzimo.appServer.connector.execution.ConnectorExecutionRunner.aroundReceive(ConnectorExecutionRunner.scala:24)
      at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
      at akka.actor.ActorCell.invoke(ActorCell.scala:496)
      at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
      at akka.dispatch.Mailbox.run(Mailbox.scala:224)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:750)
      Caused by: com.itizzimo.appServer.helper.http.package$HttpRequestClientError: The Http request was not successful due to the client error: [401: Unauthorized – Authentication is possible but has failed or not yet been provided.] Response: <?xml version=\”1.0\” encoding=\”UTF-8\”?>
      <Response><Errors><Error>AuthFailure<Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>7f1e81f1-717c-4e56-b6cc-29004d5e29cb</RequestID></Response>
      at com.itizzimo.appServer.helper.http.definitions.logging.Exceptions$RequestExecution$.DefaultHttpRequestClientError(Exceptions.scala:122)
      at com.itizzimo.appServer.helper.http.client.HttpClient.transformResponse(HttpClient.scala:243)
      at com.itizzimo.appServer.helper.http.client.HttpClient.$anonfun$generalRequestWorkflow$4(HttpClient.scala:226)
      at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:304)
      at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:37)
      at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:60)
      at akka.dispatch.BatchingExecutor$AbstractBatch.processBatch(BatchingExecutor.scala:55)
      at akka.dispatch.BatchingExecutor$BlockableBatch.$anonfun$run$1(BatchingExecutor.scala:91)
      at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
      at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:81)
      at akka.dispatch.BatchingExecutor$BlockableBatch.run(BatchingExecutor.scala:91)
      at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:40)
      … 3 more
      “,
      “executionMetrics”:{
      “begin”:”2023-12-19T05:43:52.973857573+01:00″,
      “end”:”2023-12-19T05:43:53.100878048+01:00″,
      “duration”:”127,020 ms”,
      “durationNano”:127020475,
      “steps”:[
      {
      “name”:”REST Request Execution Operation”,
      “begin”:”2023-12-19T05:43:52.973905319+01:00″,
      “end”:”2023-12-19T05:43:53.100864014+01:00″,
      “duration”:”126,959 ms”,
      “durationNano”:126958695,
      “finishedSuccessfully”:false,
      “subSteps”:[
      {
      “name”:”Prepare URI”,
      “begin”:”2023-12-19T05:43:52.973986821+01:00″,
      “end”:”2023-12-19T05:43:52.974075786+01:00″,
      “duration”:”88,965 μs”,
      “durationNano”:88965,
      “finishedSuccessfully”:true
      },
      {
      “name”:”Prepare Http-Settings”,
      “begin”:”2023-12-19T05:43:52.974095565+01:00″,
      “end”:”2023-12-19T05:43:52.97413852+01:00″,
      “duration”:”42,955 μs”,
      “durationNano”:42955,
      “finishedSuccessfully”:true
      },
      {
      “name”:”Prepare Payload”,
      “begin”:”2023-12-19T05:43:52.97414947+01:00″,
      “end”:”2023-12-19T05:43:52.974162738+01:00″,
      “duration”:”13,268 μs”,
      “durationNano”:13268,
      “finishedSuccessfully”:true
      },
      {
      “name”:”Augment Http Request with Authorization”,
      “begin”:”2023-12-19T05:43:52.974320035+01:00″,
      “end”:”2023-12-19T05:43:52.97436067+01:00″,
      “duration”:”40,635 μs”,
      “durationNano”:40635,
      “finishedSuccessfully”:true
      },
      {
      “name”:”Execute Http Request”,
      “begin”:”2023-12-19T05:43:52.974396474+01:00″,
      “end”:”2023-12-19T05:43:53.100834207+01:00″,
      “duration”:”126,438 ms”,
      “durationNano”:126437733,
      “finishedSuccessfully”:false
      }
      ]
      }
      ]
      },
      “additionalExecutionProperties”:{
      “httpErrorEntity”:”‘∞'”,
      “httpErrorResponse”:{
      “Protocol”:”HTTP/1.1″,
      “Status-Code”:401,
      “Headers”:{
      “Server”:”AmazonEC2″,
      “Strict-Transport-Security”:”max-age=31536000; includeSubDomains”,
      “Cache-Control”:”no-cache, no-store”,
      “Date”:”Tue, 19 Dec 2023 04:43:53 GMT”,
      “x-amzn-RequestId”:”7f1e81f1-717c-4e56-b6cc-29004d5e29cb”,
      “vary”:”accept-encoding”
      },
      “Content-Type”:”text/xml; charset=UTF-8″,
      “Entity”:”‘∞'”
      },
      “names”:{
      “connector”:”AWS_EC2_TEST_CONNECTOR”,
      “connectorCall”:”DescribeInstances”
      },
      “uri”:”https://ec2.ap-south-1.amazonaws.com/?Action=DescribeInstances&Version=2016-11-15&#8243;,
      “httpErrorStatusCodeDefinition”:{
      “intValue”:401,
      “reason”:”Unauthorized”,
      “defaultMessage”:”Authentication is possible but has failed or not yet been provided.”,
      “type”:{
      “isSuccess”:false,
      “isFailure”:true,
      “isRedirection”:false,
      “allowsEntity”:true
      }
      },
      “httpErrorContentTypeDefinition”:{
      “mediaType”:{
      “main”:”text”,
      “sub”:”xml”,
      “class”:”Open Charset”,
      “compressibility”:”Compressible”,
      “information”:{
      “isWildcard”:false,
      “isMultipart”:false,
      “isCompressible”:true,
      “isBinary”:false,
      “isMessage”:false,
      “isApplication”:false,
      “isVideo”:false,
      “isAudio”:false,
      “isText”:true,
      “isImage”:false
      },
      “fileExtensions”:[
      “xml”
      ],
      “qValue”:1.0
      },
      “charset”:{
      “value”:”UTF-8″,
      “aliases”:[
      “UTF8”
      ],
      “qValue”:1.0
      }
      },
      “httpErrorStatusCode”:401,
      “httpErrorContentType”:”text/xml; charset=UTF-8″,
      “httpErrorEntityDefinition”:”‘∞'”,
      “httpErrorMessage”:”The Http request was not successful due to the client error: [401: Unauthorized – Authentication is possible but has failed or not yet been provided.] Response: <?xml version=\”1.0\” encoding=\”UTF-8\”?>
      <Response><Errors><Error>AuthFailure<Message>AWS was not able to validate the provided access credentials</Message></Error></Errors><RequestID>7f1e81f1-717c-4e56-b6cc-29004d5e29cb</RequestID></Response>”,
      “withApiKey”:false
      }
      }

      • This topic was modified 11 months ago by Ritesh Kumar.
      Ritesh Kumar
          Has successfully completed the online course Basics (100)
        10 months ago #42420
        Up
        0
        Down
        ::

        Hi Team,
        Any update on this ?
        Regards
        Ritesh Kumar

        Chris Bouveret
            Has successfully completed the online course Introduction
            Has successfully completed the online course Intermediate (200)
            Has successfully completed the online course Advanced (300)
            Has successfully completed the online course Basics (100)
            Has successfully completed the online course Advanced (320)
            Has successfully completed the Intermediate Certification
            Has successfully completed the Advanced Certification
          10 months ago #42434
          Up
          0
          Down
          ::

          Hi,

          of course, you can connect with the mentioned endpoint through a connector. It seems that you have a problem with the Auth Header that is required by AWS. Please compare the Headers configured in your Postman request and check if you entered it correctly in your connector call.

        Viewing 3 posts - 1 through 3 (of 3 total)

        You must be logged in to reply to this topic.