Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s3 is not proxied as expected #190

Open
michal1106 opened this issue Dec 19, 2022 · 1 comment
Open

s3 is not proxied as expected #190

michal1106 opened this issue Dec 19, 2022 · 1 comment

Comments

@michal1106
Copy link
Contributor

michal1106 commented Dec 19, 2022

We are trying to use serverless-apigateway-service-proxy to hook the s3 to api gateway (and in turn to our website)

But something doesn’t seem to work properly (in S3 => API Gateway part)

is there an easy way to solve it?
I assume this plugin would just proxy the s3 and return whatever status-code and headers the s3 returns - is there a way to achieve this?

Thanks,
Michal

@michal1106
Copy link
Contributor Author

to fix images I found that binaryMediaTypes need to be set with */*
and this can be achieved in serverless by adding

#provider.apiGateway.binaryMediaTypes
provider:
  apiGateway:
    binaryMediaTypes: "*/*"

understood this from the file below that in turn is called by this plugin: https://github.com/serverless/serverless/blob/main/lib/plugins/aws/package/compile/events/api-gateway/lib/rest-api.js#8,21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant