Can I Use Lambda Layers with Container Images?

0
9
Asked By CuriousCat99 On

Hey everyone,

I'm having some issues with Lambda layers. My current setup involves a Lambda function that uses an image type instead of a zip file, and I'm trying to add a Dynatrace layer to it. However, I'm unsure if it's possible to incorporate a layer into a Lambda function that's set up this way. I'm running into an error that says including a handler, runtime, or layer isn't allowed when using a package type of 'Image'. Has anyone experienced this or know how to proceed?

5 Answers

Answered By LambdaLover34 On

The correct approach is to include everything in your base image and push it to Amazon ECR. Image-based Lambdas don’t utilize layers like zip-based ones do.

Answered By DataDev24 On

As others have pointed out, and as the Lambda API error indicates, layers aren't applicable when you're running from a container image. Just install Dynatrace within the container. Just a heads up, it may need internet access to transmit data unless you've set up a private link with Dynatrace, so keep an eye on the VPC subnet where you're deploying your function.

Answered By CloudExplorer88 On

To use Lambda layers with container images, you actually have to include the layer in your container image itself. Check out the AWS blog for details on working with Lambda layers in this context.

Answered By TechWhiz42 On

You don't really need a layer for this; it's better to just bake the Dynatrace dependency directly into your container image instead of trying to add a layer. That's how it works with image-based Lambdas.

Answered By CloudGuru77 On

Layers are only compatible with zip archives, not images. You should build the necessary packages into your image instead.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.