Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 089d44b

Browse files
handling missing creds
1 parent 78737ed commit 089d44b

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

‎.github/workflows/nodejs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Integration Tests
22

33
on:
4-
pull_request:
4+
push:
55
branches: [ master ]
66

77
jobs:

‎serverless.component.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: aws-lambda
2-
version: 0.0.3
2+
version: 0.0.4
33
author: eahefnawy
44
org: serverlessinc
55
description: Deploys an AWS Lambda Function

‎src/utils.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ const randomId = Math.random()
3131
* @param {*} region
3232
*/
3333
const getClients = (credentials, region) => {
34+
// this error message assumes that the user is running via the CLI though...
35+
if (Object.keys(credentials).length === 0) {
36+
const msg = `Credentials not found. Make sure you have a .env file in the cwd. - Docs: https://git.io/JvArp`
37+
throw new Error(msg)
38+
}
39+
3440
const iam = new AWS.IAM({ credentials, region })
3541
const lambda = new AWS.Lambda({ credentials, region })
3642
return { iam, lambda }

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /