diff --git a/public/app/plugins/datasource/cloudwatch/config_ctrl.ts b/public/app/plugins/datasource/cloudwatch/config_ctrl.ts
new file mode 100644
index 00000000000..8f9a8a970ba
--- /dev/null
+++ b/public/app/plugins/datasource/cloudwatch/config_ctrl.ts
@@ -0,0 +1,31 @@
+///
+
+import angular from 'angular';
+import _ from 'lodash';
+
+export class CloudWatchConfigCtrl {
+ static templateUrl = 'partials/config.html';
+ current: any;
+
+ /** @ngInject */
+ constructor($scope) {
+ this.current.jsonData.timeField = this.current.jsonData.timeField || '@timestamp';
+ this.current.jsonData.authType = this.current.jsonData.authType || 'credentials';
+ }
+
+ authTypes = [
+ {name: 'Access & secret key', value: 'keys'},
+ {name: 'Credentials file', value: 'credentials'},
+ {name: 'ARN', value: 'arn'},
+ ];
+
+ indexPatternTypes = [
+ {name: 'No pattern', value: undefined},
+ {name: 'Hourly', value: 'Hourly', example: '[logstash-]YYYY.MM.DD.HH'},
+ {name: 'Daily', value: 'Daily', example: '[logstash-]YYYY.MM.DD'},
+ {name: 'Weekly', value: 'Weekly', example: '[logstash-]GGGG.WW'},
+ {name: 'Monthly', value: 'Monthly', example: '[logstash-]YYYY.MM'},
+ {name: 'Yearly', value: 'Yearly', example: '[logstash-]YYYY'},
+ ];
+}
+
diff --git a/public/app/plugins/datasource/cloudwatch/module.ts b/public/app/plugins/datasource/cloudwatch/module.ts
index 1d81c429d86..e2e70ca5f7c 100644
--- a/public/app/plugins/datasource/cloudwatch/module.ts
+++ b/public/app/plugins/datasource/cloudwatch/module.ts
@@ -2,10 +2,7 @@ import './query_parameter_ctrl';
import {CloudWatchDatasource} from './datasource';
import {CloudWatchQueryCtrl} from './query_ctrl';
-
-class CloudWatchConfigCtrl {
- static templateUrl = 'partials/config.html';
-}
+import {CloudWatchConfigCtrl} from './config_ctrl';
class CloudWatchAnnotationsQueryCtrl {
static templateUrl = 'partials/annotations.editor.html';
diff --git a/public/app/plugins/datasource/cloudwatch/partials/config.html b/public/app/plugins/datasource/cloudwatch/partials/config.html
index 94c495d8fbf..c877ef470b0 100644
--- a/public/app/plugins/datasource/cloudwatch/partials/config.html
+++ b/public/app/plugins/datasource/cloudwatch/partials/config.html
@@ -2,24 +2,36 @@