Skip to content

Commit

Permalink
Add basics for new type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
sbstjn committed Feb 13, 2018
1 parent cf83cd8 commit e88ce07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/plugin.ts
Expand Up @@ -18,10 +18,11 @@ class S3BucketPlugin {

private getS3Credentials() {
let credentials = null
const provider = this.serverless.getProvider('aws')

if (this.serverless.service.provider.profile) {
if (provider && provider.profile) {
credentials = new s3.AWS.SharedIniFileCredentials({
profile: this.serverless.service.provider.profile
profile: provider.profile
})
}

Expand Down
1 change: 1 addition & 0 deletions vendor/serverless.d.ts
Expand Up @@ -13,6 +13,7 @@ declare namespace Serverless {
getRegion: () => string
getServerlessDeploymentBucketName: () => string
getStage: () => string
profile: {}
}
}
}
Expand Down

0 comments on commit e88ce07

Please sign in to comment.