[{"data":1,"prerenderedAt":70},["ShallowReactive",2],{"pattern-lambda-layer-ssm-parameters":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":16,"extension":17,"framework":18,"gitHub":19,"highlight":6,"introBox":25,"language":29,"level":30,"meta":31,"patternArch":32,"resources":46,"s3URL":63,"services":6,"stem":64,"testing":65,"videoId":6,"__hash__":69},"patterns\u002Fpatterns\u002Flambda-layer-ssm-parameters.json","AWS Lambda Layer and SSM Parameter Store for multiple functions",null,{"text":8},[9],"Delete the stack: \u003Ccode>aws cloudformation delete-stack --stack-name STACK_NAME\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fgreg-davis.json",{"text":13},[14,15],"sam build","sam deploy --guided --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND","A Lambda Layer and the SSM Parameter Store to centrally manage configuration values that can be used by multiple Lambda functions.","json","AWS SAM",{"template":20},{"repoURL":21,"templateURL":22,"projectFolder":23,"templateFile":24},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-layer-ssm-parameters","serverless-patterns\u002Flambda-layer-ssm-parameters","lambda-layer-ssm-parameters","template.yml",{"headline":26,"text":27},"How it works",[28],"The SSM Parameter Store is used to store configuration values, each with a specific parameter path or hierachy (eg: \u002FConfig\u002F{Parameter-Name}). The Lambda Layer uses the API command 'GetParametersByPathCommand' to retrieve all of the configuration values that match the parameter path. The Lambda Layer code runs once during the intial Lambda function invocation and stores the configuration values in an object named 'config'. The object is stored in the execution environment's memory and is available for subsequent function invocations. The 'config' object is refreshed whenever a new cold-start of the Lambda function occurs.","Node.js","300",{},{"icon1":33,"icon2":38,"line1":42},{"x":34,"y":35,"service":36,"label":37},20,50,"lambda","Lambda",{"x":39,"y":35,"service":40,"label":41},70,"ssm","Systems Manager Parameter Store",{"from":43,"to":44,"label":45},"icon1","icon2","",{"bullets":47},[48,51,54,57,60],{"text":49,"link":50},"Building Lambda Layers in AWS SAM","https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fbuilding-layers.html",{"text":52,"link":53},"Using nested applications in AWS SAM","https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fserverless-sam-template-nested-applications.html",{"text":55,"link":56},"Lambda function URLs","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Flambda-urls.html",{"text":58,"link":59},"Creating Systems Manager parameters","https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-paramstore-su-create.html",{"text":61,"link":62},"Working with parameter hierachies","https:\u002F\u002Fdocs.aws.amazon.com\u002Fsystems-manager\u002Flatest\u002Fuserguide\u002Fsysman-paramstore-hierarchies.html","https:\u002F\u002Fda-public-assets.s3.amazonaws.com\u002Fpatterns\u002Flambda-layer-ssm-parameters\u002Fcloudformation.yml","patterns\u002Flambda-layer-ssm-parameters",{"text":66},[67,68],"From a web browser, navigate to the Url of the Lambda function to return all of the configuration values.","Update the parameters in the 'parameters\u002Ftemplate.yml' if you want to change the configuration values. The value of a parameter can be a simple alpha-numeric string or a JSON string. Then use `sam build` and `sam deploy` to update the stack.","gAtWwKyqwM-WyO-qkC7Dmg37OfLCDHACqwjQofU_dG8",1782233468099]