diff --git a/pkg/app/piped/platformprovider/lambda/client.go b/pkg/app/piped/platformprovider/lambda/client.go index caffdde33d..10e8f21aa8 100644 --- a/pkg/app/piped/platformprovider/lambda/client.go +++ b/pkg/app/piped/platformprovider/lambda/client.go @@ -184,11 +184,24 @@ func (c *client) CreateFunctionFromSource(ctx context.Context, fm FunctionManife Variables: fm.Spec.Environments, }, } + if len(fm.Spec.Architectures) != 0 { + architectures := make([]types.Architecture, 0, len(fm.Spec.Architectures)) + for _, arch := range fm.Spec.Architectures { + architectures = append(architectures, types.Architecture(arch.Name)) + } + input.Architectures = architectures + } if fm.Spec.EphemeralStorage != nil { input.EphemeralStorage = &types.EphemeralStorage{ Size: aws.Int32(fm.Spec.EphemeralStorage.Size), } } + if fm.Spec.VPCConfig != nil { + input.VpcConfig = &types.VpcConfig{ + SecurityGroupIds: fm.Spec.VPCConfig.SecurityGroupIDs, + SubnetIds: fm.Spec.VPCConfig.SubnetIDs, + } + } _, err = c.client.CreateFunction(ctx, input) if err != nil { return fmt.Errorf("failed to create Lambda function %s: %w", fm.Spec.Name, err)