title: AWS Textract InvalidParameterException
body: <p>I have a .Net core client application using amazon Textract with S3,SNS and SQS as per the AWS Document  , Detecting and Analyzing Text in Multipage Documents(<a href="https://docs.aws.amazon.com/textract/latest/dg/async.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/textract/latest/dg/async.html</a>)</p>
  
  <p>Created an AWS Role  with AmazonTextractServiceRole Policy and added the Following Trust relation ship as per the documentation (<a href="https://docs.aws.amazon.com/textract/latest/dg/api-async-roles.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/textract/latest/dg/api-async-roles.html</a>)
  {
    "Version": "2012-10-17",
    "Statement": [
      {
        "Effect": "Allow",
        "Principal": {
          "Service": "textract.amazonaws.com"
        },
        "Action": "sts:AssumeRole"
      }
    ]
  } </p>
  
  <p>Subscribed SQS to the topic and Given Permission to the Amazon SNS Topic to Send Messages to the Amazon SQS Queue as per the aws documentation .</p>
  
  <p>All Resources including S3 Bucket, SNS ,SQS are in the same us-west2 region</p>
  
  <p>The following method shows a generic error "InvalidParameterException"
  Request has invalid parameters </p>
  
  <p>But If the NotificationChannel section is commented the code is working fine and returning the correct job id.  </p>
  
  <p>Error message is not giving a clear picture about the parameter.  Highly appreciated any help .</p>
  
  <pre><code>public async Task&lt;string&gt; ScanDocument()
  {
              string roleArn = "aws:iam::xxxxxxxxxxxx:instance-profile/MyTextractRole";
              string topicArn = "aws:sns:us-west-2:xxxxxxxxxxxx:AmazonTextract-My-Topic";
              string bucketName = "mybucket";
              string filename = "mytestdoc.pdf";
  
              var request = new StartDocumentAnalysisRequest();
              var notificationChannel = new NotificationChannel();
              notificationChannel.RoleArn = roleArn;
              notificationChannel.SNSTopicArn = topicArn;
  
              var s3Object = new S3Object
              {
                  Bucket = bucketName,
                  Name = filename
              };
              request.DocumentLocation = new DocumentLocation
              {
                  S3Object = s3Object
              };
              request.FeatureTypes = new List&lt;string&gt;() { "TABLES", "FORMS" };
              request.NotificationChannel = channel; /* Commenting this line work the code*/
              var response = await this._textractService.StartDocumentAnalysisAsync(request);
              return response.JobId;
  
          }
  </code></pre>