Skip to content

Instantly share code, notes, and snippets.

@gochist
Last active February 25, 2023 21:42
Show Gist options
  • Save gochist/aa63a577b10084d8163b022680ad2b71 to your computer and use it in GitHub Desktop.
Save gochist/aa63a577b10084d8163b022680ad2b71 to your computer and use it in GitHub Desktop.
envoy-s3.yaml
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }
static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 10000 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match:
prefix: /
headers:
- name: authorization
regex_match: .*/ap-northeast-2/.*
route: { cluster: service_s3_ap_northeast_2 }
#route: { host_rewrite: s3.ap-northeast-2.amazonaws.com, cluster: service_s3 }
http_filters:
- name: envoy.router
clusters:
- name: service_s3_ap_northeast_2
connect_timeout: 0.25s
type: LOGICAL_DNS
# Comment out the following line to test on v6 networks
dns_lookup_family: V4_ONLY
lb_policy: ROUND_ROBIN
hosts: [{ socket_address: { address: s3.ap-northeast-2.amazonaws.com, port_value: 443 }}]
tls_context: { sni: s3.ap-northeast-2.amazonaws.com }
@abdennour
Copy link

what about proxying S3 with custom endpoint ? like Minio S3 to AWS S3 ? what should be changed ? (i.e. regex_match ...etc ? )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment