Comments (7)
Hey all,
Was able to get over this bump by upgrading aws-cdk to v2.85 and aws-sdk to something higher than 2.1311 that is compatible with v2.85. I also had to include a couple of files manually in the infra.pkg.json
There are newer version of CDK / SDK available - but I only managed to fix errors till 2.85. Newer versions throw more errors than what my puny little brain can handle 😅
(2.85 is the lowest version of CDK with all the bug fixes that replaces the use of deprecated runtimes. See here and here )
The error is related to AWS deprecating the lambda runtimes - the old versions of CDK deploys Lambda function helpers with the deprecated runtimes, thus blocking all new deployments and updates, till we update the CDK dependency.
While this got me over the deployment problem, I am far from being able to tell if the new dependency versions would cause some runtime issues with Matano, due to hidden breaking changes / regression. Would need the help of maintainers to comment on the significance of sticking to AWS CDK v2.54 version.
This is the patch of the changes I applied
aws-cdk.patch.txt
Pasting it here directly to make the changes easy to see.
Hope this helps!
diff --git a/cli/package.json b/cli/package.json
index 0100152..36f5da1 100644
--- a/cli/package.json
+++ b/cli/package.json
@@ -26,8 +26,8 @@
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^2.0.1",
"ansi-styles": "^5",
- "aws-cdk": "2.54.0",
- "aws-sdk": "^2.1093",
+ "aws-cdk": "2.85.0",
+ "aws-sdk": "^2.1311",
"chalk": "^4",
"enquirer": "^2.3",
"execa": "^5",
@@ -110,4 +110,4 @@
"prettier": {
"printWidth": 120
}
-}
+}
\ No newline at end of file
diff --git a/infra.pkg.json b/infra.pkg.json
index 892a58e..2562770 100644
--- a/infra.pkg.json
+++ b/infra.pkg.json
@@ -1,18 +1,25 @@
{
"name": "matano-cdk",
"pkg": {
- "scripts": ["./infra/dist/**/*.js"],
- "targets": ["node14.18.1-linux-x64", "node14.18.1-macos-x64"],
+ "scripts": [
+ "./infra/dist/**/*.js"
+ ],
+ "targets": [
+ "node14.18.1-linux-x64",
+ "node14.18.1-macos-x64"
+ ],
"assets": [
"./data/**/*",
+ "./infra/node_modules/aws-cdk-lib/custom-resource-handlers/lib/aws-s3/auto-delete-objects-handler/*.js",
"./infra/node_modules/aws-cdk-lib/custom-resources/lib/provider-framework/runtime/*.js",
"./infra/node_modules/aws-cdk-lib/lambda-layer-awscli/**/*",
"./infra/node_modules/aws-cdk-lib/asset-awscli-v1/**/*",
"./infra/node_modules/@aws-cdk/asset-awscli-v1/**/*",
"./infra/node_modules/aws-cdk-lib/aws-s3-assets/**/*",
"./infra/node_modules/aws-cdk-lib/aws-s3-deployment/**/*",
- "./infra/node_modules/aws-cdk-lib/aws-s3/**/*"
+ "./infra/node_modules/aws-cdk-lib/aws-s3/**/*",
+ "./infra/node_modules/aws-cdk-lib/lazy-index.js"
],
"outputPath": "build"
}
-}
+}
\ No newline at end of file
diff --git a/infra/package.json b/infra/package.json
index ffdc44c..4151995 100644
--- a/infra/package.json
+++ b/infra/package.json
@@ -24,9 +24,9 @@
"dependencies": {
"@aws-cdk/cx-api": "*",
"@mrgrain/cdk-esbuild": "^3",
- "aws-cdk": "2.54.0",
- "aws-cdk-lib": "2.54.0",
- "aws-sdk": "^2.1093",
+ "aws-cdk": "2.85.0",
+ "aws-cdk-lib": "2.85.0",
+ "aws-sdk": "^2.1311",
"constructs": "^10.0.0",
"fs-extra": "^10.1.0",
"promptly": "^3.2.0",
@@ -39,4 +39,4 @@
"prettier": {
"printWidth": 120
}
-}
+}
\ No newline at end of file
diff --git a/scripts/packaging/build.js b/scripts/packaging/build.js
index bde9c8f..5ef0144 100644
--- a/scripts/packaging/build.js
+++ b/scripts/packaging/build.js
@@ -43,7 +43,7 @@ function setCliPackageVersion() {
}
function prepareCdkPkg() {
- execSync("npm install [email protected]", { cwd: workDir });
+ execSync("npm install [email protected]", { cwd: workDir });
// some js template files mess up pkg, just delete
fs.rmSync(path.resolve(workDir, "node_modules/aws-cdk/lib/init-templates/app/javascript"), {
from matano.
The above changes fixed my problems! Thank you.
from matano.
Hi there, something to add here too, needs to be updated the python requeriments for the matano_detection lambda, i face a few error with my detections and i fix it using the solution posted here ++ adding this to the req>
aiobotocore==2.8.0
from matano.
Hi, we are also hitting the same issue, can someone please advise on how we resolve?
Blocking our deployments
Cheers
from matano.
The runtime version needs to be bumped here:
https://github.com/matanolabs/matano/blob/main/infra/lib/rust-function-layer/Dockerfile#L3
from matano.
Any idea when it will be fixed?
from matano.
I've deployed a change that should fix these issues.
from matano.
Related Issues (20)
- Feature Request: Request for having a config option to set the log retention (cloudwatch, S3 Objects)
- Documentation: Request to add detailed architecture diagram and explanation as part of documentation
- Enable Custom alert_context in Alert
- Feature Request: Support for AWS Health Events
- teleport - Managed Log Source HOT 2
- Feature Request: Add options pertaining to snapshot expire schedule as part of config HOT 2
- large file sizes causing OOMKills and timeouts HOT 4
- GitHub audit logs can optionally include client IP addresses
- Enable versioning on Matano-managed buckets
- How to just deploy matano in environments where cloud provisioning is guardrail-ed and controlled HOT 3
- Zeek log source does not accept TSV format
- Github Audit - Define `token_id` field statically as long or string HOT 2
- Faulty Metadata `file_path` Pointers
- Expected Lambda Throttling Behavior and Performance Benchmarks
- Error: An error occurred: Access Denied
- Cloudflare HTTP Event Log Source Schema is incorrect for `BotTags` HOT 1
- o365
- Snyk managed integration new URL endpoint. HOT 1
- Feature Request: GuardDuty managed log source
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 matano.