@@ -77,7 +77,6 @@ var apiGatewayAssumePolicy = `{
77
77
// Platform implementation.
78
78
type Platform struct {
79
79
config * up.Config
80
- runtime string
81
80
handler string
82
81
zip * bytes.Buffer
83
82
events event.Events
@@ -87,7 +86,6 @@ type Platform struct {
87
86
func New (c * up.Config , events event.Events ) * Platform {
88
87
return & Platform {
89
88
config : c ,
90
- runtime : c .Lambda .Runtime ,
91
89
handler : "_proxy.handle" ,
92
90
events : events ,
93
91
}
@@ -562,7 +560,7 @@ retry:
562
560
res , err := c .CreateFunction (& lambda.CreateFunctionInput {
563
561
FunctionName : & p .config .Name ,
564
562
Handler : & p .handler ,
565
- Runtime : & p .runtime ,
563
+ Runtime : & p .config . Lambda . Runtime ,
566
564
Role : & p .config .Lambda .Role ,
567
565
MemorySize : aws .Int64 (int64 (p .config .Lambda .Memory )),
568
566
Timeout : aws .Int64 (int64 (p .config .Proxy .Timeout + 3 )),
@@ -626,7 +624,7 @@ func (p *Platform) updateFunction(c *lambda.Lambda, a *apigateway.APIGateway, up
626
624
_ , err = c .UpdateFunctionConfiguration (& lambda.UpdateFunctionConfigurationInput {
627
625
FunctionName : & p .config .Name ,
628
626
Handler : & p .handler ,
629
- Runtime : & p .runtime ,
627
+ Runtime : & p .config . Lambda . Runtime ,
630
628
Role : & p .config .Lambda .Role ,
631
629
MemorySize : aws .Int64 (int64 (p .config .Lambda .Memory )),
632
630
Timeout : aws .Int64 (int64 (p .config .Proxy .Timeout + 3 )),
@@ -814,7 +812,7 @@ func (p *Platform) roleName() string {
814
812
func (p * Platform ) deleteRole (region string ) error {
815
813
name := fmt .Sprintf ("%s-function" , p .config .Name )
816
814
c := iam .New (session .New (aws .NewConfig ().WithRegion (region )))
817
-
815
+
818
816
// role is provided
819
817
if s := p .config .Lambda .Role ; s != "" {
820
818
log .Debugf ("using role from config %s; not deleting" , s )
0 commit comments