Giter Site home page Giter Site logo

Comments (4)

regoawt avatar regoawt commented on June 20, 2024 1

Managed to resolve the issue.

I still don't have a good explanation for why I was only getting the error when running the function through the Power Tuner, but as shown in the function error log, it was to do with the permissions of the Lambda package files. I found this issue: aws/aws-cdk#8707 (comment) which pointed me in the right direction.

I had to configure the CDK bundling options of my function to give full permission to every file in the package using chmod:

code=_lambda.Code.from_asset(
    path=os.path.join(os.path.dirname(__file__), "src"),
    bundling=BundlingOptions(
        image=_lambda.Runtime.PYTHON_3_12.bundling_image,
        command=[
            "bash",
            "-c",
            "&&".join(
                [
                    "pip install -r requirements.txt --no-deps --platform manylinux2014_x86_64 -t /asset-output",
                    "cp -au . /asset-output",
                    "chmod -R 777 /asset-output",
                ]
            ),
        ],
        platform="linux/amd64",
    ),
),

from aws-lambda-power-tuning.

alexcasalboni avatar alexcasalboni commented on June 20, 2024

Hey @regoawt thanks for reaching out 🙏

This looks very similar to #242 and it could be related to the function timing out.

#247 has implemented a way to log the exact function invocation error (rather than this stream/array of numbers) and it's been merged, although it hasn't been published as a new SAR version.

I imagine you're deploying using SAR via CDK, right?

I'd suggest to deploy the latest Lambda Power Tuning without using SAR and check if you get a better invocation error.

from aws-lambda-power-tuning.

regoawt avatar regoawt commented on June 20, 2024

@alexcasalboni thanks for the quick reply!

Will take a look at the linked issue. Yes I have deployed using SAR - will deploy the latest version using other means.

from aws-lambda-power-tuning.

regoawt avatar regoawt commented on June 20, 2024

PS it works with 755 permissions as per https://docs.aws.amazon.com/lambda/latest/dg/troubleshooting-deployment.html#troubleshooting-deployment-denied

from aws-lambda-power-tuning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.