ExAws.S3.Crypto.encrypt

You're seeing just the function encrypt, go back to ExAws.S3.Crypto module for more information.
Link to this function

encrypt(operation, key_id, opts \\ [])

View Source

Specs

encrypt(
  operation :: ExAws.Operation.S3.t(),
  key_id :: binary(),
  opts :: encrypt_opts()
) :: ExAws.Operation.S3.t()

Modify a ExAws.Operation.S3 put operation by encrypting the body with a key generated from KMS using the given master key_id.

For example:

bucket = "my-awesome-bucket"
key_id = "123e4567-e89b-12d3-a456-426655440000"
contents = "this is some special text that should be secret"

# Encrypt, then upload object
request = ExAws.S3.put_object(bucket, "secret.txt.enc", contents)
{:ok, encrypted_request} = ExAws.S3.Crypto.encrypt(request, key_id)
ExAws.request(encrypted_request)