Skip to content
This repository was archived by the owner on Mar 6, 2022. It is now read-only.

Commit e41af1f

Browse files
committed
change to use exported GetSessionAWS and remove unused updateLambdaFunction
1 parent 0164d32 commit e41af1f

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

pkg/server/infrastructure.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type lambdaInfrastructure struct {
3232

3333
// SetupLambdaInfrastructure sets up IAM role needed to run awslambdaproxy
3434
func SetupLambdaInfrastructure() error {
35-
sess, err := getSessionAWS()
35+
sess, err := GetSessionAWS()
3636
if err != nil {
3737
return err
3838
}
@@ -95,7 +95,7 @@ func SetupLambdaInfrastructure() error {
9595
}
9696

9797
func (infra *lambdaInfrastructure) setup() error {
98-
sess, err := getSessionAWS()
98+
sess, err := GetSessionAWS()
9999
if err != nil {
100100
return err
101101
}
@@ -189,18 +189,6 @@ func (infra *lambdaInfrastructure) createLambdaFunction(svc *lambda.Lambda, role
189189
return nil
190190
}
191191

192-
func (infra *lambdaInfrastructure) updateLambdaFunction(svc *lambda.Lambda, roleArn string, payload []byte) error {
193-
_, err := svc.UpdateFunctionCode(&lambda.UpdateFunctionCodeInput{
194-
ZipFile: payload,
195-
FunctionName: aws.String(lambdaFunctionName),
196-
Publish: aws.Bool(true),
197-
})
198-
if err != nil {
199-
return err
200-
}
201-
return nil
202-
}
203-
204192
func lambdaExists(svc *lambda.Lambda) (bool, error) {
205193
_, err := svc.GetFunction(&lambda.GetFunctionInput{
206194
FunctionName: aws.String(lambdaFunctionName),

0 commit comments

Comments
 (0)