serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
Getting a 403 on http://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz when trying to install dynamodb local
Actual Behaviour
when trying to stall dynamodb local using sls dynamodb install
, I get an error:
Error: Error getting DynamoDb local latest tar.gz location undefined: 403
This only started happening 10 minutes ago and is failing on all previously working branches of my code as well. which leads me to believe that the issue is not local
Expected Behaviour
latest dynamodb should install
Steps to reproduce it
sample package.json file
{
"version": "0.1.0",
"private": true,
"dependencies": {
"apollo-boost": "^0.1.23",
"apollo-server-express": "^2.3.1",
"aws-sdk": "^2.392.0",
"cookie-parser": "~1.4.3",
"cors": "^2.8.5",
"debug": "~2.6.9",
"dynamodb-localhost": "^0.0.7",
"dynamoose": "^1.5.0",
"express": "~4.16.0",
"express-graphql": "^0.7.1",
"graphql": "^14.1.0",
"graphql-playground-middleware-express": "^1.7.8",
"graphql-tag": "^2.10.0",
"graphql-upload": "^8.0.4",
"http-errors": "~1.6.2",
"jade": "~1.11.0",
"morgan": "~1.9.0",
"npx": "^10.2.0",
"s3-upload-stream": "^1.0.7",
"serverless": "^1.36.1",
"serverless-dynamodb-local": "0.2.25",
"serverless-http": "^1.8.0",
"serverless-offline": "^4.1.3",
"serverless-webpack": "^5.2.0",
"uuid": "^3.3.2"
},
"scripts": {
"start": "npx sls offline start",
"test": "jest",
"debug": "npx --node-arg=--inspect-brk sls offline start",
"deploy:uat": "npx sls deploy -v --stage uat",
"deploy:prod": "npx sls deploy -v --stage prod",
"install:dynamo": "npx sls dynamodb install",
"lint": "./node_modules/.bin/eslint '**/*.js' --fix"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.3.1",
"babel-jest": "^24.1.0",
"babel-loader": "^8.0.5",
"eslint": "^5.12.1",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-loader": "^2.1.1",
"eslint-plugin-import": "^2.15.0",
"jest": "^24.1.0",
"webpack": "^4.28.4",
"webpack-node-externals": "^1.7.2"
}
}
I was experiencing the same problem a short time ago, but I just retried it and it worked.
I've fixed this problem, but, the PR still open: https://github.com/99xt/dynamodb-localhost/pull/41
we're getting this issue all of sudden. And it looks like a firewall/proxy issue although we've changed nothing. In any case, should the URL for the binary not be HTTPS now?
Experiencing this as of today, out of nowhere.
Also experiencing this starting today
We are suddenly experiencing this too.
I have a PR off the current master waiting for approval to fix this issue: https://github.com/99x/dynamodb-localhost/pull/78
Pls need that fix asap!
Experiencing this right now with a PR. pipeline falling.
We are also experiencing this error and pipeline is failing for a few days already. Any update on this?
Is there any workaround available?
I have a PR off the current master waiting for approval to fix this issue: 99x/dynamodb-localhost#78
Thanks a lot for your solution. It works perfectly. While we wait for @eheyder 's fix to be merged, @eheyder ’s fix can be implemented directly in the node_modules files for the dynamodb-local package in the files @eheyder added fixes for in his PR. You can then patch the npm package using patch-package. To do this, you can follow the steps below:
-
Install
patch-package
package (see the guide here at https://github.com/ds300/patch-package/blob/master/README.md) using npm or yarn (preferably as a dev dependency) -
Add the post-install script to your package.json as mentioned in the guide in 1)
-
Go to the files @eheyder changed in your node modules and make the changes exactly as @eheyder did. These changes should be in the package named dynamodb-local
-
Save the changes and run
yarn patch-package dynamodb-local
ornpx patch-package dynamodb-local
-
You can now push your changes and your application will now use @eheyder ’s changes and no more breakages will occur.
I think this can, especially if you need the changes ASAP.
For my testing I just forked the serverless-dynamodb-local and updated to use the forked repo for dynamodb-localhost. This allowed for a single line update in the package.json
.
from:
"devDependencies": {
"serverless-dynamodb-local": "^0.2.40",
}
to:
"devDependencies": {
"serverless-dynamodb-local": "https://github.com/eheyder/serverless-dynamodb-local.git#v1",
}
This is an alternative that can be used for a quick fix.
The other way is to replace using sls dynamodb install
with a direct download format as follows.
wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz
mkdir .dynamodb
tar zxvf dynamodb_local_latest.tar.gz -C .dynamodb
However, the method written by eheyder would be more excellent :)
Fingers crossed for a new version on npm...
The other way is to replace using
sls dynamodb install
with a direct download format as follows.wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz mkdir .dynamodb tar zxvf dynamodb_local_latest.tar.gz -C .dynamodb
However, the method written by eheyder would be more excellent :)
Tnks!