{"action":"created","issue":{"url":"https://api.github.com/repos/Tim-B/grunt-aws-lambda/issues/18","labels_url":"https://api.github.com/repos/Tim-B/grunt-aws-lambda/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/Tim-B/grunt-aws-lambda/issues/18/comments","events_url":"https://api.github.com/repos/Tim-B/grunt-aws-lambda/issues/18/events","html_url":"https://github.com/Tim-B/grunt-aws-lambda/issues/18","id":92971516,"number":18,"title":"config does not pull default region from the environment","user":{"login":"donleyp","id":2924080,"avatar_url":"https://avatars.githubusercontent.com/u/2924080?v=3","gravatar_id":"","url":"https://api.github.com/users/donleyp","html_url":"https://github.com/donleyp","followers_url":"https://api.github.com/users/donleyp/followers","following_url":"https://api.github.com/users/donleyp/following{/other_user}","gists_url":"https://api.github.com/users/donleyp/gists{/gist_id}","starred_url":"https://api.github.com/users/donleyp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/donleyp/subscriptions","organizations_url":"https://api.github.com/users/donleyp/orgs","repos_url":"https://api.github.com/users/donleyp/repos","events_url":"https://api.github.com/users/donleyp/events{/privacy}","received_events_url":"https://api.github.com/users/donleyp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-04T04:54:15Z","updated_at":"2015-07-14T10:55:56Z","closed_at":null,"body":"In the Lambda environment the default region used by the AWS SDK is the region in which the Lambda function is running. In the grunt-aws-lambda environment when running the task locally the region is not set. I have the region specified in ~/.aws/config as us-west-2 but it is not picking it up from there.\r\n\r\nHere is the error thrown by the AWS SDK when I try to make a call to CloudWatchLogs api:\r\n{ [ConfigError: Missing region in config]\r\n  message: 'Missing region in config',\r\n  code: 'ConfigError',\r\n  time: Fri Jul 03 2015 21:37:54 GMT-0700 (PDT) }\r\n"},"comment":{"url":"https://api.github.com/repos/Tim-B/grunt-aws-lambda/issues/comments/121200640","html_url":"https://github.com/Tim-B/grunt-aws-lambda/issues/18#issuecomment-121200640","issue_url":"https://api.github.com/repos/Tim-B/grunt-aws-lambda/issues/18","id":121200640,"user":{"login":"cyxou","id":5896622,"avatar_url":"https://avatars.githubusercontent.com/u/5896622?v=3","gravatar_id":"","url":"https://api.github.com/users/cyxou","html_url":"https://github.com/cyxou","followers_url":"https://api.github.com/users/cyxou/followers","following_url":"https://api.github.com/users/cyxou/following{/other_user}","gists_url":"https://api.github.com/users/cyxou/gists{/gist_id}","starred_url":"https://api.github.com/users/cyxou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyxou/subscriptions","organizations_url":"https://api.github.com/users/cyxou/orgs","repos_url":"https://api.github.com/users/cyxou/repos","events_url":"https://api.github.com/users/cyxou/events{/privacy}","received_events_url":"https://api.github.com/users/cyxou/received_events","type":"User","site_admin":false},"created_at":"2015-07-14T10:55:56Z","updated_at":"2015-07-14T10:55:56Z","body":"Same problem here, but putting @donleyp's code at the top of my Gruntfile.js did not work for me."}}