Comments (13)
[email protected] was just released as the stable version.
from serverless-offline-eventbridge.
We're getting the same issue on AWS codebuild with a standard serverless deploy --stage=blah
when using version 1.6.0
. The deploy happens but the process never exits and the build times out. Downgrading to 1.5.2
fixes the issue.
from serverless-offline-eventbridge.
I've released a beta version that should resolve the issue. The problem was with the imports of 'aedes' and 'net' packages, which initialized immediately. This has been moved to the init function of the plugin.
Try the following version: [email protected]
Let me know if this works for you guys.
from serverless-offline-eventbridge.
We had the same issue on circleCi and GithubActions. Last lines of Deployment (Verbose Mode):
Serverless: Stack Output saved to file: .serverless/stack-output/outputs.json
Serverless: Stack Output saved to file: .serverless/stack-output/outputs.yml
Serverless: Removing old service artifacts from S3...
Using the [email protected] solves the problem.
Unfortunately the dependabot marks the 1.6.0. as stable.
from serverless-offline-eventbridge.
I'll release a new version (1.6.1) as soon as the others also confirm it works
from serverless-offline-eventbridge.
Hi - just to confirm, it worked for us too
from serverless-offline-eventbridge.
Can you try deploying using the --verbose option? Maybe this will give us a better indication of what is going wrong.
from serverless-offline-eventbridge.
Do you have any specific script configured in your package.json? Also, do you confirm all your serverless packages are listed as devDependencies, and you exclude devDependencies from the artifact build?
from serverless-offline-eventbridge.
hi @rcoundon !. any updates with this issue?, did you solve it?, I'm running into the same issue with the same version.
after run the serverless package command the script hang on that part
from serverless-offline-eventbridge.
Hi - sorry for radio silence, this is happening on the packaging stage and the CI tool we're using (Seed.run) doesn't yet have the option for verbose output for that command but hopefully it's coming soon.
@damien-thiesson In regard to specific scripts, no, it's just a standard sls deploy --stage someStage
We don't set excludeDevDependencies
in serverless.ts and the default is true so my assumption is that the devDependencies are excluded
from serverless-offline-eventbridge.
Just created a test project and at my end it deploys just fine. Can you try to deploy my simple example?
package.json
{
"name": "serverless-offline-eventbridge-deployment-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "SLS_DEBUG=* sls offline start --log-level info"
},
"author": "",
"license": "ISC",
"devDependencies": {
"serverless-offline": "^7.0.0",
"serverless-offline-aws-eventbridge": "^1.6.0",
"serverless-webpack": "^5.5.1",
"webpack": "^5.39.1",
"webpack-node-externals": "^3.0.0"
},
"dependencies": {
"@babel/core": "^7.8.7",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.7",
"@babel/runtime": "^7.8.7",
"aws-sdk": "^2.633.0",
"babel-loader": "^8.0.6",
"serverless": "2.47.0"
}
}
serverless.yml
service: deploymentTestEventBridge
plugins:
- serverless-webpack
- serverless-offline-aws-eventbridge
- serverless-offline
custom:
webpack:
webpackConfig: ./webpack.config.js
#includeModules: true
serverless-offline:
host: 0.0.0.0
serverless-offline-aws-eventbridge:
port: 4010
debug: true
provider:
name: aws
runtime: nodejs12.x
stage: dev
region: eu-west-1
functions:
publishEvent:
handler: events.publish
events:
- http:
path: publish
method: get
consumeEvent:
handler: events.consume
events:
- eventBridge:
eventBus: marketingDeploymentTestEventBridge
pattern:
source:
- graph
detail-type:
- update
detail:
trigger:
name:
- company
event:
data:
new:
status:
- archived
- open
events.js
import AWS from 'aws-sdk';
AWS.config.update({
apiVersion: '2015-10-07',
accessKeyId: "YOURKEY",
secretAccessKey: "YOURSECRET",
region: "eu-west-1"
});
export const publish = async () => {
try {
const eventBridge = new AWS.EventBridge({
endpoint: 'http://127.0.0.1:4010',
region: 'eu-west-1'
});
const test = await eventBridge.putEvents({
Entries: [
{
EventBusName: 'marketingDeploymentTestEventBridge',
Source: 'graph',
DetailType: 'update',
Detail: JSON.stringify({
trigger: {
name: "company",
event: {
data: {
// test: 'bla',
new: {
status: 'archived'
}
}
}
}
})
},
]
}).promise();
} catch (e) {
console.error(e);
return { statusCode: 400, body: 'could not publish' };
}
return { statusCode: 200, body: 'published' };
}
export const consume = async (event, context) => {
console.log("CONSUME 2");
console.log(event);
return { statusCode: 200, body: 'consume2' };
}
webpack.config.js
const slsw = require("serverless-webpack");
const nodeExternals = require("webpack-node-externals");
module.exports = {
entry: slsw.lib.entries,
target: "node",
// Since 'aws-sdk' is not compatible with webpack,
// we exclude all node dependencies
externals: [nodeExternals()],
mode: slsw.lib.webpack.isLocal ? "development" : "production",
optimization: {
// We no not want to minimize our code.
minimize: false
},
performance: {
// Turn off size warnings for entry points
hints: false
},
// Run babel on all .js files and skip those in node_modules
module: {
rules: [
{
test: /\.js$/,
loader: "babel-loader",
include: __dirname,
exclude: /node_modules/
}
]
}
};
from serverless-offline-eventbridge.
I've released a beta version that should resolve the issue. The problem was with the imports of 'aedes' and 'net' packages, which initialized immediately. This has been moved to the init function of the plugin.
Try the following version: [email protected]
Let me know if this works for you guys.
Thanks - I'll give this a go and report back
from serverless-offline-eventbridge.
[email protected] was just released as the stable version.
Brilliant - thank you
from serverless-offline-eventbridge.
Related Issues (20)
- Event Pattern Matching HOT 5
- context.succeed is not a function HOT 1
- `context.succeed` is not a function HOT 1
- Using intrinsic Cloud Formation functions (!GetAtt and !ImportValue) when defining the event bus name HOT 1
- PayloadTooLargeError: request entity too large HOT 3
- Request: Update serverless-offline peer dependency HOT 1
- Missing support for schedules HOT 9
- Retry attempts break the execution HOT 2
- Cannot find module 'serverless-offline/dist/lambda' HOT 1
- Unclear error message HOT 2
- serverless-offline 9.1.0 Breaking change HOT 10
- Setting up serverless-offline-eventBridge HOT 3
- cron(*/1 * * * ? *) is worked but cron(0/1 * * * ? *) is not worked HOT 2
- Installation errors with serverless-offline ^11 HOT 1
- eventBridge enabled flag is ignored HOT 7
- equals-ignore-case filter not found HOT 2
- Query: Does this package have support for the event bridge scheduler HOT 2
- Event Pattern doesn't support array of objects. HOT 2
- Stepfunction events HOT 2
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 serverless-offline-eventbridge.