Comments (4)
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.
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.
@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.
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)
- Support for testing stream-based functions HOT 2
- Option to Consume Payload from SQS source? HOT 3
- Actual Payload Shared in Step Functions Console On Function Error HOT 8
- Add KMS permission(s) that may be optionally needed HOT 11
- cost discrepancy on small lambdas HOT 2
- Add logic to identify insufficient resources causing timeout HOT 5
- 💡 Add this project to awesome-italia-opensource HOT 2
- Feature Request: Allow naming of statemachine HOT 5
- Upgrade to Node 20 HOT 1
- Getting Error While Increasing Power values to 10240 MB HOT 1
- Support for array payload accepting functions HOT 4
- Remove security sensitive lambda:DeleteFunction permission HOT 2
- Log analysis uses Billed Duration rather than Duration for calculating Lambda run time HOT 2
- Image in payload possibility HOT 5
- Bug: Support JSON logging HOT 20
- Missing num error while executing state machine HOT 4
- Help deciphering error message HOT 17
- SAR versioning is behind HOT 3
- Power Tuning Result not showing 'Execution Time' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-power-tuning.