File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 11package awslambdaproxy
22
33import (
4- "fmt"
5- "os"
4+ "log"
65
76 "github.com/dan-v/awslambdaproxy/pkg/server"
87 "github.com/spf13/cobra"
@@ -11,13 +10,16 @@ import (
1110// setupCmd represents the setup command
1211var setupCmd = & cobra.Command {
1312 Use : "setup" ,
14- Short : "Setup awslambdaproxy AWS infrastructure" ,
15- Long : `This will setup all required AWS infrastructure to run awslambdaproxy.` ,
13+ Short : "setup awslambdaproxy aws infrastructure" ,
14+ Long : `this will setup all required aws infrastructure to run awslambdaproxy.` ,
1615 Run : func (cmd * cobra.Command , args []string ) {
16+ if _ , err := server .GetSessionAWS (); err != nil {
17+ log .Fatal ("unable to find valid aws credentials" )
18+ }
19+
1720 err := server .SetupLambdaInfrastructure ()
1821 if err != nil {
19- fmt .Print ("Failed to run setup for awslambdaproxy: " , err )
20- os .Exit (1 )
22+ log .Fatal ("failed to run setup for awslambdaproxy: " , err )
2123 }
2224 },
2325}
You can’t perform that action at this time.
0 commit comments