Skip to content

Instantly share code, notes, and snippets.

@balexand
Created March 17, 2024 00:18
Show Gist options
  • Select an option

  • Save balexand/b99dd0432da56e3185abd9c5c61605f7 to your computer and use it in GitHub Desktop.

Select an option

Save balexand/b99dd0432da56e3185abd9c5c61605f7 to your computer and use it in GitHub Desktop.
Sign S3 GET request in Elixir
:aws_signature.sign_v4_query_params(
s3_config.access_key_id,
s3_config.secret_access_key,
s3_config.region,
"s3",
:erlang.universaltime(),
"GET",
"https://#{s3_config.bucket}.s3.#{s3_config.region}.amazonaws.com/#{asset.key}",
body_digest: "UNSIGNED-PAYLOAD"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment