Plugin for Kong as API Gateway to proxy S3 #7382
Replies: 6 comments
-
Who would use it and why? |
Beta Was this translation helpful? Give feedback.
-
We've recently used same approach (nginx + lua scripts) to implement a s3 proxy so we don't need to include aws sdk on client-side anymore to upload files to s3. So I would say that could be a useful plugin. But I'm not sure about caching, maybe using a cdn would be a better choice. |
Beta Was this translation helpful? Give feedback.
-
Could be a neat Kong core integration feature for Cassandra/Postgres DB backups(which is what we use S3, for but we use a tool called cassandra-snapshotter that is opensource to actually orchestrate that). But your use case is to live serve a file from S3 with an API proxy call to achieve a sort of authn/authz @ the gateway? I find that a bit indirect because S3 offerings are designed to handle the authn/authz with id/keys but I suppose it could be done. |
Beta Was this translation helpful? Give feedback.
-
@jeremyjpj0916 we generate temp auth credentials (on server-side where we don't have problem to import aws sdk) to grant s3 access for client, then client calls the proxy sending these credentials and we generate aws signature using slightly modified version of this script : https://github.com/Kong/kong/blob/master/kong/plugins/aws-lambda/v4.lua but that would be the idea. |
Beta Was this translation helpful? Give feedback.
-
Anyone knows about, how to integrate https://github.com/anomalizer/ngx_aws_auth this with kong? |
Beta Was this translation helpful? Give feedback.
-
We have a scenario involving Kong and S3 buckets too, although is to Get objects. Imagine you have a bucket with a bunch of objects, then you want to put Kong in front of it to be able to expose the objects tweaking the request (maybe Kong plugins to do authn/authz). So far, I only cover GETs... it is an alpha stage. PRs are welcome to cover e.g. "POST"/"PUT" and "DELETE" requests/operations. |
Beta Was this translation helpful? Give feedback.
-
Summary
Whether or not kong can make a plugin to upload file into S3 or download file from S3 and cache it?
For Example:
https://github.com/jamesmarlowe/lua-resty-s3
Kong can upload the file and send s3 private url to backend, receive a s3 url from backend to download the file and cache it.
I am not sure that the idea make sense as kong plugin?
Beta Was this translation helpful? Give feedback.
All reactions