TykTechnologies/custom-plugin-examples

502 Bad Gateway

can-lang opened this issue · 0 comments

Hi,

I try to use an example custom-plugin on tyk-cloud. But I got error 502 Bad Gateway.

Produce Steps:

  1. Created AWS IAM user then enable plugins like https://tyk.io/docs/tyk-cloud/configuration-options/using-plugins/setup-control-plane/
  2. Created manifest.json and middleware.py like https://tyk.io/docs/tyk-cloud/configuration-options/using-plugins/python-code-bundle/
  3. Created bundle.zip with docker:
  docker run \
  --rm \
  -v $(pwd):/cloudplugin \
  --entrypoint "/bin/sh" -it \
  -w "/cloudplugin" \
  tykio/tyk-gateway:v3.1.2 \
  -c '/opt/tyk-gateway/tyk bundle build -y'
  1. Downloaded mservctl for mac
  2. Created python-demo.mservctl.yaml file with endpoint and token that coming from dashboard.
  3. Push bundle.zip to s3: ./mservctl.macos.amd64 --config ~/my-tyk-plugin/python-demo.mservctl.yaml push ~/my-tyk-plugin/bundle.zip
  4. Checked s3 and seen bundle.zip file
  5. Created new api with bundle-id and Custom-Authorization like https://tyk.io/docs/tyk-cloud/configuration-options/using-plugins/api-test/
  6. Tested but gotten 502 Bad Gateway as response. Tested with and without Authorization header but result is same.

Any suggestion?