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

Não é possível utilizar a S3 com distribuição pelo CloudFront #1152

Open
1 task done
FeLauton opened this issue Jan 14, 2025 · 0 comments
Open
1 task done

Não é possível utilizar a S3 com distribuição pelo CloudFront #1152

FeLauton opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@FeLauton
Copy link

FeLauton commented Jan 14, 2025

Welcome!

  • Yes, I have searched for similar issues on GitHub and found none.

What did you do?

Olá!

Estou tentando configurar o uso do S3 para armazenar os arquivos recebidos.

What did you expect?

Seria bom se não for o caso, atribuir a região através da S3_REGION deixando o S3_ENDPOINT apenas para a definição do endpoint de acesso dos arquivos.

E também seria interessante que caso não seja informado o S3_SECRET_KEY e S3_ACCESS_KEY que a evo busque pelas variaveis nativas da AWS AWS_ACCESS_KEY_ID e AWS_SECRET_ACCESS_KEY que podem estar configuradas por IAM functions global na instancia.

What did you observe instead of what you expected?

A documentação do evolution pede para que seja enviado a região na variável S3_ENDPOINT, porém quando utilizamos o Cloudfront para criar uma distribuição do bucket e deixar esse bucket fechado para acesso publico, o endpoint de acesso dos arquivos se torna algo como: https://1hn326409ewjy.cloudfront.net

- S3_ENDPOINT=s3.sa-east-1.amazonaws.com
- S3_REGION=sa-east-1

Screenshots/Videos

No response

Which version of the API are you using?

2.2.0

What is your environment?

Docker

Other environment specifications

No response

If applicable, paste the log output

[Evolution API]    v2.2.0  214   -  Tue Jan 14 2025 12:48:36     ERROR   [S3 Service]  [object]   
S3Error
    at parseError (/evolution/node_modules/minio/dist/main/internal/xml-parser.js:51:13)
    at Object.parseResponseError (/evolution/node_modules/minio/dist/main/internal/xml-parser.js:98:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Client.makeRequestStreamAsync (/evolution/node_modules/minio/dist/main/internal/client.js:513:19)
    at async Client.uploadBuffer (/evolution/node_modules/minio/dist/main/internal/client.js:1404:17)
    at async Et (/evolution/dist/main.js:227:12375)
    at async messages.upsert (/evolution/dist/main.js:250:22081) {
  amzRequestid: undefined,
  amzId2: undefined,
  amzBucketRegion: undefined
} 
[Evolution API]  [CustomerSuccess]  v2.2.0  214   -  Tue Jan 14 2025 12:48:36     ERROR   [ChannelStartupService]  [object]   
[
  'Error on upload file to minio',
  [ 'Presigned GET url cannot be generated for anonymous requests' ],
  undefined
]
`

### Additional Notes

_No response_
@FeLauton FeLauton added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant