{"id":268,"date":"2024-08-29T16:28:40","date_gmt":"2024-08-29T15:28:40","guid":{"rendered":"https:\/\/livingdevops.com\/?p=268"},"modified":"2025-07-05T10:36:19","modified_gmt":"2025-07-05T09:36:19","slug":"python-lambda-layers-with-terraform-github-actions","status":"publish","type":"post","link":"https:\/\/livingdevops.com\/devops\/python-lambda-layers-with-terraform-github-actions\/","title":{"rendered":"Complete Guide To Building &#038; Publishing Python Lambda Layers with Terraform &#038; GitHub Actions"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<pre class=\"wp-block-preformatted\">Managing the AWS Lambda Layer Was a Nightmare Until I Did&nbsp;This<\/pre>\n\n\n\n<p>I started my Devops career with the Google Cloud platform and used Cloud functions for event-driven serverless workloads. It was pretty straightforward\u200a\u2014\u200apackage the Python code with its dependencies, i.e. <code>requirements.txt<\/code> and everything else will be taken care of by Cloud Function(i.e. GCP).<\/p>\n\n\n\n<p>Then I moved to AWS and discovered Lambda, their popular serverless offering. It was great, except for one headache: managing code dependencies.<\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-2356534591331561\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-2356534591331561\"\n     data-ad-slot=\"3134096072\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<p>I was used to just using a <code>requirements.txt<\/code> file, but that doesn\u2019t work with Lambda. Instead, you have two options. You can either bundle all your libraries with your code in a big zip file (which is a pain to manage) or use something called Lambda Layers.<\/p>\n\n\n\n<p>Before I explain Layers and how to use them effectively, let me give you a quick rundown on Lambda and serverless computing in general.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is serverless?<\/h3>\n\n\n\n<p>Don\u2019t let the term \u201cserverless\u201d fool you\u200a\u2014\u200ait doesn\u2019t mean servers have vanished into thin air. Instead, think of it as \u201cservers you don\u2019t see.\u201d In this model, your cloud provider manages the resources for you, handling all the nitty-gritty of server maintenance.<\/p>\n\n\n\n<p>At its core, serverless computing is about simplifying your life as a developer or business owner. It\u2019s a world where you can focus on what truly matters\u200a\u2014\u200ayour code and business logic\u200a\u2014\u200awithout getting bogged down in the complexities of managing the machines that run it.<\/p>\n\n\n\n<p>That\u2019s the promise of serverless computing\u200a\u2014\u200ait\u2019s about freeing you to innovate, while your cloud provider handles the heavy lifting of infrastructure management.<\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-2356534591331561\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-2356534591331561\"\n     data-ad-slot=\"3134096072\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<h3 class=\"wp-block-heading\">What is the&nbsp;Lambda?<\/h3>\n\n\n\n<p>It is the Function as a service (serverless) offered by AWS. It uses an event-driven architecture, meaning it runs a piece of code when some event occurs. It integrates well with other AWS services such as Dynomodb, S3, SQS, API gateway, etc.<\/p>\n\n\n\n<p>Your code may be just a couple of lines, or spread across 2 files but if it requires 15 different packages to tie everything together, it\u2019s referred to as a \u201cdeployment package.<\/p>\n\n\n\n<p>It is best practice to manage the code dependencies separately and this is where lambda Layers come in handy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is the Lambda&nbsp;layer?<\/h3>\n\n\n\n<p>To Quote AWS documentation \u2014<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>A Lambda layer is a&nbsp;<code><em>.zip<\/em><\/code> file archive that contains supplementary code or data. Layers usually contain library dependencies, a <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/runtimes-custom.html\" rel=\"noreferrer noopener\" target=\"_blank\">custom runtime<\/a>, or configuration files.<\/p>\n<\/blockquote>\n\n\n\n<p>In simple words, if your Python code requires 5,10,15 libraries to run the code, you build them separately and enable Lambda to use them on runtime.<\/p>\n\n\n\n<p>Lambda Layers are the zip archives that contain these \u201cpackages\u201d (or libraries). The libraries enable you to add the dependency code in your Lambda without making it a part of your deployment package<\/p>\n\n\n\n<p>You can also share one layer with other Lambda functions across multiple AWS accounts.<\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-2356534591331561\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-2356534591331561\"\n     data-ad-slot=\"3134096072\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<h3 class=\"wp-block-heading\">How to Build Lambda&nbsp;Layers?<\/h3>\n\n\n\n<p>The simplest way of building Layers is to install the Python dependencies in your local machine inside a Python directory, zip it, and upload it to AWS layers. Your Lambda function can use the layer.<\/p>\n\n\n\n<p>Note: Creating a zip package from a non-Linux environment (even Mac) will NOT WORK with Lambda.<\/p>\n\n\n\n<p>Alternatively, you can use the docker with <code>-- platform linux\/amd6<\/code> flag to build the layer with the help of <a href=\"https:\/\/gallery.ecr.aws\/sam\/build-python3.9\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>sam\/build-python<\/strong><\/a><strong> docker images.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run --platform linux\/amd64 -v \\<br>\"$PWD\":\/var\/task \"public.ecr.aws\/sam\/build-python3.10\" \/bin\/sh \\<br>-c \"pip install -r requirements.txt -t python\/; exit\"<\/code><\/pre>\n\n\n\n<p>If you want to share your Layer in a different AWS account, add permissions by running the below command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>aws lambda add-layer-version-permission \\<br>--layer-name &lt;Layer_name&gt; \\<br>--statement-id xaccount \\<br>--action lambda:GetLayerVersion \\<br>--principal &lt;AWS_ACCOUNT_ID&gt; \\<br>--version-number &lt;Layer_Version&gt;<\/code><\/pre>\n\n\n\n<p>Managing Lambda Layers manually can be a lot of pain when every other month you need to update the libraries to use new versions of libraries to take your security team off your back.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-2356534591331561\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-2356534591331561\"\n     data-ad-slot=\"3134096072\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<h3 class=\"wp-block-heading\">Automating the Layer build with Terraform and Github&nbsp;Action.<\/h3>\n\n\n\n<p>Before we start writing Terraform, create the file structure in your VSCode as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*f3EgrsP8t9cNs0D8XUiczA.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Defining Python dependencies for&nbsp;layers<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>layers\/layer1\/requirements.txt<\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>aws-psycopg2<br>requests==2.32.3<br>urllib3==2.2.2<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>layers\/layer1\/requirements.txt<\/code><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>pyzipper ==0.3.6<br>pycryptodome ==3.20.0<br>cryptography ==41.0.7<br>PyPDF2 ==3.0.1<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Sometimes we also need to use common scripts such as logger, and db-connection scripts used by Lambda functions. We can package them with the dependencies to avoid packaging them with Lambda code or building separate layers for these scripts.<\/li>\n<\/ul>\n\n\n\n<p>Place those Python scripts in <code>layers\/common-scripts\/ <\/code>path<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Writting Terraform configuration to build the Lambda layers with GitHub&nbsp;Action<\/h3>\n\n\n\n<p><a href=\"https:\/\/github.com\/akhileshmishrabiz\/Devops-zero-to-hero\/tree\/main\/AWS-Projects\/lambda-python-layers-terraform\" rel=\"noreferrer noopener\" target=\"_blank\">You can find the code for this blog in my public GitHub repo here<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>providers.tf<\/code><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*eQJhvlsHphOGjWyvq-IVCA.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Setting up terraform providers and remote backend using s3 bucket I have already created to store the terraform state files<\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-2356534591331561\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-2356534591331561\"\n     data-ad-slot=\"3134096072\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>variable.tf<\/code><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*ZVCFdFPOo36FdZe_Cbz3Vw.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>We will store default values for Python layers such as runtime, and compatible runtimes.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>config.tf<\/code><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*JULSBYKZIfe-wPg5-HM5Ig.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>We will create local variables to store the layer details such as layer name and path to the dependencies<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>s3.tf<\/code><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*K_6G5uBgrR5TRQhGJbrrWQ.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>Use the data source to get the AWS account ID and use it as a prefix to ensure the unique name of the S3 bucket, and use it to store the layers packages in<code>&nbsp;.zip<\/code> format<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>main.tf<\/code><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*NdDD_gsPlAFbMHQS9-CvJg.png\" alt=\"\"\/><\/figure>\n\n\n\n<p>It will use the Terraform module (<code><a href=\"https:\/\/registry.terraform.io\/modules\/terraform-aws-modules\/lambda\/aws\/latest\" rel=\"noreferrer noopener\" target=\"_blank\">terraform-aws-modules\/lambda\/aws<\/a><\/code>) for Lambda to build Python layers. I will package the custom scripts along with the layers for usability.<\/p>\n\n\n\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-2356534591331561\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block; text-align:center;\"\n     data-ad-layout=\"in-article\"\n     data-ad-format=\"fluid\"\n     data-ad-client=\"ca-pub-2356534591331561\"\n     data-ad-slot=\"3134096072\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><em>If you want to share the layers across multiple accounts, it can be easily done. Just below lines to your existing terraform code.<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Append <code>config.tf<\/code> and <code>main.tf<\/code> with the below code## config.tf<br>locals{ # List of layers names<br>layer_names = &#91;for i in local.layer_definitions : i.identifier] # Accounts that should have permission on layer version<br>allowed_accounts = &#91;\"AWS_ACCOUNT_ID_1\", \"AWS_ACCOUNT_ID_2\"] # Mapping layers -&gt; aws accounts for permission on layer version<br>layers_to_accounts = flatten(&#91;for layer in local.layer_names : &#91;for account in local.allowed_accounts : { id = \"${layer}-${account}\", layer = layer, account = account }]])<br><br># Map to be used by for_each loop for resource<br>layers_to_accounts_map = { for item in local.layers_to_accounts : item.id =&gt; item }<br>}###################################################### main.tf<br>resource \"aws_lambda_layer_version_permission\" \"lambda_layer_permission\" {<br>for_each = local.layers_to_accounts_map<br>layer_name = module.layers&#91;each.value.layer].lambda_layer_layer_arn<br>version_number = module.layers&#91;each.value.layer].lambda_layer_version<br>principal = each.value.account<br>action = \"lambda:GetLayerVersion\"<br>statement_id = \"${each.value.layer}-${each.value.account}-${random_integer.random.result}\"<br>}resource \"random_integer\" \"random\" {<br>min = 1<br>max = 1000<br>}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>That is all the Terraform you need to build the layers. We will use Github Action to deploy these layers.<\/p>\n\n\n\n<p>Here is the GitHub Action workflow that will build the layers. <a href=\"https:\/\/github.com\/akhileshmishrabiz\/Devops-zero-to-hero\/tree\/main\/AWS-Projects\/lambda-python-layers-terraform\" rel=\"noreferrer noopener\" target=\"_blank\">You can find the code for this blog in my public GitHub repo here<\/a>.<\/p>\n\n\n\n<p><code>build-lambda-layers.yml<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>name: Build layer with TF\non:\n  # On push to main branch when there is a change in dependencies\n  push:\n    branches:\n      - main\n    paths:\n      - lambda-python-layers\/layers\/\n  # Run manually\n  workflow_dispatch:\njobs:\n  terraform:\n    runs-on: ubuntu-latest\n    env:\n      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n      AWS_REGION: ap-south-1\n      TERRAFORM_VER: 1.6.6\n      TERRAFORM_PATH: lambda-python-layers\/\n      PYTHON_VERSION: '3.10'\n    steps:\n      - name: Checkout Repository\n        uses: actions\/checkout@v2\n      - name: Setup Terraform\n        uses: hashicorp\/setup-terraform@v3\n        with:\n          terraform_version: ${{ env.TERRAFORM_VER }}\n      - name: Setup Python\n        uses: actions\/setup-python@v5\n        with:\n          python-version: ${{ env.PYTHON_VERSION }}\n      - name: Terraform Init\n        working-directory: ${{ env.TERRAFORM_PATH }}\n        run: terraform init\n      - name: Terraform Plan\n        working-directory: ${{ env.TERRAFORM_PATH }}\n        run: terraform plan -out=tfplan\n      - name: Terraform Apply\n        working-directory: ${{ env.TERRAFORM_PATH }}\n        run: terraform apply -auto-approve tfplan\n\n<\/code><\/pre>\n\n\n\n<p>This GitHub Action workflow is designed to deploy Terraform to build the layers for a specific path(layers\/ ) within a repository.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Triggers:<br>&#8211; on push to the <code>main<\/code> branch, specifically if files within the <code>lambda-python-layers\/layers\/<\/code> directory is updated.<br>&#8211; Can be triggered manually via <code>workflow_dispatch.<\/code><\/li>\n\n\n\n<li>Job Configuration:<br>&#8211; Job runs on the <code>ubuntu-latest<\/code> runner.<br>&#8211; AWS credentials and region are sourced from GitHub Secrets, and the Terraform version (`1.6.6`) and Python version (`3.10`) are specified.<\/li>\n\n\n\n<li>Steps:<br>&#8211; Checkout repository using the <code>actions\/checkout@v2<\/code> action.<br>&#8211; Install Terraform version using <code>hashicorp\/setup-terraform@v3<\/code>.<br>&#8211; Install Python 3.10 using <code>actions\/setup-python@v5<\/code>.<br>&#8211; Run Terraform commands to deploy the layers.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Running the automation.<\/h3>\n\n\n\n<p>You can clone the code from my Public Github Repo# Clone my GitHub repo<br>git clone https:\/\/github.com\/akhileshmishrabiz\/Devops-zero-to-hero.git# Create a folder\/directory<br>mkdir lambda-layer-example<br>cd lambda-layer-example# Copy the terraform from Devops-zero-to-hero\/lambda-python-layers<br>cp -r Devops-zero-to-hero\/lambda-python-layers .# Create a .github\/workflows folder to store the GitHub Action workflow<br>mkdir -p .github\/workflows# Create a .yml file<br>touch .github\/workflows\/layer-build.yml# Copy the workflow code from the cloned repo<br>cp Devops-zero-to-hero\/.github\/workflows\/build-lambda-layer.yml .github\/workflows\/layer-build.yml# Create a github repository and push the code from lambda-layer-example to<br># your repo.<\/p>\n\n\n\n<p><strong>Create access and secret keys and store them as secrets in your GitHub repo<\/strong><\/p>\n\n\n\n<p><code>Go to your repo &gt; settings &gt; \/secrets and variables &gt; actions<\/code><\/p>\n\n\n\n<p>Create two secrets there \u2014<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>AWS_ACCESS_KEY_ID = AWS_ACCESS_KEY_YOU_CREATED<br>&nbsp;AWS_SECRET_ACCESS_KEY = AWS_SECRET_YOU_CREATED<\/code><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Push the code, and it will trigger the workflow. Also, you can run it manually.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*LPpZSWYFu0eT-SfWXqb7fA.png\" alt=\"\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*JgHyLrnOaQyyPD7LQHQYPg.png\" alt=\"\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>You can see the layers in your AWS accounts\u200a\u2014\u200a<code>Lambda &gt; Layer<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/cdn-images-1.medium.com\/max\/1000\/1*8HGYMUPNOyW8NNEGcq1Cdw.png\" alt=\"\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>The Terraform code for this is placed <\/strong><a href=\"https:\/\/github.com\/akhileshmishrabiz\/Devops-zero-to-hero\/tree\/main\/AWS-Projects\/lambda-python-layers-terraform\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>here<\/strong><\/a><strong>, and the GitHub Action workflow is <\/strong><a href=\"https:\/\/github.com\/akhileshmishrabiz\/Devops-zero-to-hero\/blob\/main\/.github\/workflows\/build-lambda-layer.yml\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>here<\/strong><\/a><strong>.<\/strong><\/p>\n\n\n\n<p>If you found this blog post useful, <strong>clap<\/strong>, <strong>follow,<\/strong> and <a href=\"https:\/\/medium.com\/@akhilesh-mishra\/subscribe\" rel=\"noreferrer noopener\" target=\"_blank\"><strong>subscribe<\/strong><\/a><strong> so you don\u2019t miss my future articles.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">About me<\/h3>\n\n\n\n<p>I am Akhilesh Mishra, a self-taught Devops engineer with 11+ years working on private and public cloud (GCP &amp; AWS)technologies.<\/p>\n\n\n\n<p>Connect with me on Linkedin: <a href=\"https:\/\/www.linkedin.com\/in\/akhilesh-mishra-0ab886124\/?source=about_page-------------------------------------\" rel=\"noreferrer noopener\" target=\"_blank\">https:\/\/www.linkedin.com\/in\/akhilesh-mishra-0ab886124\/<\/a><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Managing the AWS Lambda Layer Was a Nightmare Until I Did&nbsp;This I started my Devops career with the Google Cloud platform and used Cloud functions for event-driven serverless workloads. It was pretty straightforward\u200a\u2014\u200apackage the Python code with its dependencies, i.e. requirements.txt and everything else will be taken care of by Cloud Function(i.e. GCP). Then I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":270,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,12],"tags":[],"class_list":["post-268","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-tutorials"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/posts\/268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/comments?post=268"}],"version-history":[{"count":4,"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/posts\/268\/revisions"}],"predecessor-version":[{"id":1015,"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/posts\/268\/revisions\/1015"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/media\/270"}],"wp:attachment":[{"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/media?parent=268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/categories?post=268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/livingdevops.com\/wp-json\/wp\/v2\/tags?post=268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}