[{"data":1,"prerenderedAt":59},["ShallowReactive",2],{"pattern-lambda-function-alias":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":29,"level":30,"meta":31,"patternArch":32,"resources":44,"s3URL":6,"services":6,"stem":52,"testing":53,"videoId":6,"__hash__":58},"patterns\u002Fpatterns\u002Flambda-function-alias.json","AWS Lambda with alias and version",null,{"text":8},[9],"Delete the stack: \u003Ccode>sam delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Falice-goumain.json",{"text":13},[14],"sam deploy","Create a lambda function with an alias and a version","json","AWS SAM",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-version-alias","serverless-patterns\u002Flambda-version-alias","lambda-version-alias","template.yaml",{"headline":25,"text":26},"How it works",[27,28],"This pattern creates a Lambda function with an alias 'dev' associated with the latest version of the function.","The inline code is written in the template. For every update on the CloudFormation stack: the function's code and the version description need to be updated to trigger the changeset and create a new version.","Python","200",{},{"icon1":33,"icon2":37,"line1":40},{"x":34,"y":35,"service":36,"label":36},20,50,"",{"x":35,"y":35,"service":38,"label":39},"lambda","AWS Lambda",{"from":41,"to":42,"label":43},"icon1","icon2","Alias\u002Fversion",{"bullets":45},[46,49],{"text":47,"link":48},"Lambda function versions","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-versions.html",{"text":50,"link":51},"Lambda function aliases","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fconfiguration-aliases.html","patterns\u002Flambda-function-alias",{"text":54},[55,56,57],"Go to the function and run it.","To create a new version, you need to UPDATE the stack with: a change in the function's code and a new version description","Then upon update, the alias 'dev' will be associated with the latest version","X7bKxA2jM048wrfQDaKmBh1r2BBCCdPkgqlUWGLGUNI",1778846886248]