// ĠCopyright Ġ 2 0 1 8 ĠAmazon . com , ĠInc . Ġor Ġits Ġaffiliates . ĠAll ĠRights ĠReserved . Ċ // ĠSPDX - License - Identifier : ĠApache - 2 . 0 Ċ Ċ package Ġsoftware . aws . tool k its . jetbrains . services . lambda . execution . sam Ċ Ċ import Ġcom . intellij . execution . Run Manager Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġsoftware . amazon . aw ssdk . services . lambda . model . Runtime Ċ import Ġsoftware . aws . tool k its . core . region . Aws Region Ċ import Ġsoftware . aws . tool k its . jetbrains . services . lambda . execution . Lambda Run Configuration Ċ Ċ fun Ġcreate Run Configuration ( ĊĠĠĠ Ġproject : ĠProject , ĊĠĠĠ Ġruntime : ĠRuntime ? Ġ= ĠRuntime . JAVA 8 , ĊĠĠĠ Ġhandler : ĠString ? Ġ= Ġ" com . example . Lambda Handler :: handle Request ", ĊĠĠĠ Ġinput : ĠString ? Ġ= Ġ" input Text ", ĊĠĠĠ Ġinput Is File : ĠBoolean Ġ= Ġfalse , ĊĠĠĠ Ġcredentials Provider Id : ĠString ? Ġ= Ġnull , ĊĠĠĠ Ġregion : ĠAws Region ? Ġ= ĠAws Region (" us - east - 1 ", Ġ" us - east - 1 "), ĊĠĠĠ Ġtemplate File : ĠString ? Ġ= Ġnull , ĊĠĠĠ Ġlogical FunctionName : ĠString ? Ġ= Ġnull Ċ ): ĠSam Run Configuration Ġ{ ĊĠĠĠ Ġval Ġrun Manager Ġ= ĠRun Manager . getInstance ( project ) ĊĠĠĠ Ġval Ġtop Level Factory Ġ= Ġrun Manager . configuration Factories . first Ġ{ Ġit Ġis ĠLambda Run Configuration Ġ} ĊĠĠĠ Ġval Ġfactory Ġ= Ġtop Level Factory . configuration Factories . first Ġ{ Ġit Ġis ĠSam Run Configuration Factory Ġ} ĊĠĠĠ Ġval Ġrun Configuration And Settings Ġ= Ġrun Manager . create Run Configuration (" Test ", Ġfactory ) ĊĠĠĠ Ġval Ġrun Configuration Ġ= Ġrun Configuration And Settings . configuration Ġas ĠSam Run Configuration ĊĠĠĠ Ġrun Manager . add Configuration ( run Configuration And Settings ) ĊĊĠĠĠ Ġrun Configuration . configure ( runtime , Ġhandler , Ġinput , Ġinput Is File , Ġmutable Map Of (), Ġcredentials Provider Id , Ġregion , Ġtemplate File , Ġlogical FunctionName ) ĊĊĠĠĠ Ġreturn Ġrun Configuration Ċ }