serverless-dynamodb-local icon indicating copy to clipboard operation
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

Open yashutanna opened this issue 5 years ago • 16 comments

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"
  }
}

yashutanna avatar Feb 06 '19 14:02 yashutanna

I was experiencing the same problem a short time ago, but I just retried it and it worked.

dgpratt avatar Feb 06 '19 15:02 dgpratt

I've fixed this problem, but, the PR still open: https://github.com/99xt/dynamodb-localhost/pull/41

muriloamendola avatar Mar 11 '19 14:03 muriloamendola

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?

oshea00 avatar Mar 02 '23 22:03 oshea00

Experiencing this as of today, out of nowhere.

AaronRohrbacher avatar Mar 02 '23 23:03 AaronRohrbacher

Also experiencing this starting today

Jacesheck avatar Mar 03 '23 05:03 Jacesheck

We are suddenly experiencing this too.

rafacmp avatar Mar 03 '23 13:03 rafacmp

I have a PR off the current master waiting for approval to fix this issue: https://github.com/99x/dynamodb-localhost/pull/78

eheyder avatar Mar 03 '23 13:03 eheyder

Pls need that fix asap!

pablogdnd avatar Mar 03 '23 15:03 pablogdnd

Experiencing this right now with a PR. pipeline falling.

janetth28 avatar Mar 03 '23 23:03 janetth28

We are also experiencing this error and pipeline is failing for a few days already. Any update on this?

liuxiaofeng1981 avatar Mar 06 '23 01:03 liuxiaofeng1981

Is there any workaround available?

yaguchii avatar Mar 06 '23 13:03 yaguchii

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:

  1. 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)

  2. Add the post-install script to your package.json as mentioned in the guide in 1)

  3. 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

  4. Save the changes and run yarn patch-package dynamodb-local or npx patch-package dynamodb-local

  5. 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.

josephobiagba avatar Mar 06 '23 14:03 josephobiagba

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.

eheyder avatar Mar 06 '23 16:03 eheyder

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 :)

SaitomTech avatar Mar 07 '23 04:03 SaitomTech

Fingers crossed for a new version on npm...

codebravotech avatar Mar 27 '23 23:03 codebravotech

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!

edderleonardo avatar May 10 '24 16:05 edderleonardo