[erlang-questions] erlcloud s3 example

Tim Fletcher mail@REDACTED
Tue Dec 13 18:26:09 CET 2011


> Does anyone have an example of how to use erlcloud [1] with S3?
> I cannot figure out how to feed it the Amazon AWS credentials.

Looks like it loads credentials from the environment by default, so
you would have to set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

Alternatively you can set the config manually, something like this:

  -include("erlcloud_aws.hrl").

  ...

  put(aws_config, #aws_config{access_key_id=AccessKeyID,
secret_access_key=SecretAccessKey}),

Then for example:

  erlcloud_s3:list_buckets().

Hope that helps.

Tim



More information about the erlang-questions mailing list