We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6b1f98 commit e0d17edCopy full SHA for e0d17ed
aws-node-single-page-app-via-cloudfront/serverless-single-page-app-plugin/index.js
@@ -37,7 +37,14 @@ class ServerlessPlugin {
37
}
38
39
runAwsCommand(args) {
40
- const result = spawnSync('aws', args);
+ let command = 'aws';
41
+ if (this.serverless.variables.service.provider.region) {
42
+ command = `${command} --region ${this.serverless.variables.service.provider.region}`;
43
+ }
44
+ if (this.serverless.variables.service.provider.profile) {
45
+ command = `${command} --profile ${this.serverless.variables.service.provider.profile}`;
46
47
+ const result = spawnSync(command, args);
48
const stdout = result.stdout.toString();
49
const sterr = result.stderr.toString();
50
if (stdout) {
0 commit comments