title: Keep getting FATAL EXCEPTION: AsyncTask #1 when trying to do insert query from android app to amazon
body: <p>I would like to run an async task to insert data into my amazon rds using an amazon lambda.  It worked a few times and now I'm getting errors.  The first one is: </p>
  
  <p>ERROR:</p>
  
  <pre><code> --------- beginning of crash
  E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
  
   The second one is: 
  W/System.err: java.io.IOException: open failed: ENOENT (No such file or 
  directory)
                at java.io.File.createNewFile(File.java:939)
  </code></pre>
  
  <p>I have permissions is my manifest file.  Why am I getting these errors? Thanks!</p>
  
  <p>Private class DBTask extends AsyncTask{
    public LambdaInvokerFactory credentialsProvider(){
          CognitoCachingCredentialsProvider cognitoProvider = new CognitoCachingCredentialsProvider(
                  BarcodeActivity.this.getApplicationContext(),
                  "xxxxxx",
                  "xxxxxx",
                  "xxxxxx",
                  "xxxx",
                  Regions.US_EAST_1 );</p>
  
  <pre><code>    // Create LambdaInvokerFactory, to be used to instantiate the Lambda proxy.
      LambdaInvokerFactory factory = new LambdaInvokerFactory( BarcodeActivity.this.getApplicationContext(),
                                                               Regions.US_EAST_1, cognitoProvider );
      return factory;
  }
  
  private void getVehicle ( Vehicle veh ) {
      System.out.println( "IN GET VEHICLE: " + veh.getRfidtag() );
      DBTask task = new DBTask( veh );
      task.execute();
      try {
          Thread.sleep( 5000 );
      } catch (InterruptedException e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>private class DBTask extends AsyncTask {
      ProgressDialog dialog;</p>
  
  <pre><code>    CognitoCachingCredentialsProvider cognitoProvider = new CognitoCachingCredentialsProvider(
             BarcodeActivity.this.getApplication(), "us-east-1:2a880431-f082-4704-a864-c2ab621be94c", Regions.US_EAST_1 );
  
  
      // Create LambdaInvokerFactory, to be used to instantiate the Lambda proxy.
      LambdaInvokerFactory factory = new LambdaInvokerFactory( BarcodeActivity.this.getApplicationContext(),
                                                               Regions.US_EAST_1, cognitoProvider );
      final AWSInterface myInterface = factory.build( AWSInterface.class );
      private Vehicle v;
      public DBTask ( Vehicle veh ) {
         v=veh;
      }
      String m="hi";
  
    /*  @Override
      protected void onPreExecute() {
          // Set up progress dialog
          super.onPreExecute();
          dialog = new ProgressDialog(BarcodeActivity.this);
         dialog.setMessage("adding...");
         dialog.setCancelable( false );
          dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
          dialog.setCancelable(false);
          dialog.show();
  
      }*/
      @Override
      protected ResponseClass doInBackground ( Vehicle... vehicles ) {
  
          try{
              Log.e("tag","in try statment "+ v);
  
             return myInterface.volvoinventoryfunc(v);
          }catch(LambdaFunctionException lfe){
              Log.e( "Tag", "Failed to invoke echo", lfe );
              return null;
          }
  
      }
      @Override
      protected void onPostExecute ( ResponseClass result ) {
          dialog.dismiss();
        //  if (result == null) {
         //     return;
        //  }
  
          // Do a toast
        //  Toast.makeText( BarcodeActivity.this, result.getGreetings(), Toast.LENGTH_LONG ).show();
          super.onPostExecute(result);
  
      }
  }
  </code></pre>