Fix service.provider.region resolution

This commit is contained in:
Mariusz Nowak 2019-06-28 10:19:22 +02:00 committed by Philipp Muens
parent 0f04931c55
commit f4d42d1cb6

View File

@ -124,6 +124,9 @@ class AwsProvider {
this.serverless = serverless;
this.sdk = AWS;
this.serverless.setProvider(constants.providerName, this);
if (this.serverless.service.provider.name === 'aws') {
this.serverless.service.provider.region = this.getRegion();
}
this.requestCache = {};
this.requestQueue = new PromiseQueue(2, Infinity);
// Store credentials in this variable to avoid creating them several times (messes up MFA).