Skip to content

Commit 2fe0067

Browse files
author
dfounderliu
committed
fix: tempKey
1 parent 11a823f commit 2fe0067

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/serverless.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,14 @@ class Express extends Component {
144144
console.log(`Removing Tencent Webiste ...`)
145145

146146
// 获取腾讯云密钥信息
147-
const credentials = this.credentials.tencent
147+
if (!this.credentials.tencent.tmpSecrets) {
148+
throw new Error('Please add SLS_QcsRole in your tencent account.')
149+
}
150+
const credentials = {
151+
SecretId: this.credentials.tencent.tmpSecrets.TmpSecretId,
152+
SecretKey: this.credentials.tencent.tmpSecrets.TmpSecretKey,
153+
Token: this.credentials.tencent.tmpSecrets.Token
154+
}
148155

149156
// 默认值
150157
const region = inputs.region || 'ap-guangzhou'

0 commit comments

Comments
 (0)