added aws settings when writing file