{"id":15285856,"url":"https://github.com/adroll/erlcloud","last_synced_at":"2025-10-07T01:30:18.691Z","repository":{"id":37980686,"uuid":"370632206","full_name":"AdRoll/erlcloud","owner":"AdRoll","description":"Cloud Computing library for erlang (Amazon EC2, S3, SQS, SimpleDB, Mechanical Turk, ELB)","archived":false,"fork":true,"pushed_at":"2024-07-01T00:09:08.000Z","size":4497,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-01T17:28:37.618Z","etag":null,"topics":["aws","erlang","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"SemanticSugar/erlcloud","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdRoll.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-25T09:11:35.000Z","updated_at":"2024-07-05T01:32:06.000Z","dependencies_parsed_at":"2023-02-12T02:01:20.630Z","dependency_job_id":null,"html_url":"https://github.com/AdRoll/erlcloud","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Ferlcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Ferlcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Ferlcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdRoll%2Ferlcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdRoll","download_url":"https://codeload.github.com/AdRoll/erlcloud/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235569500,"owners_count":19011184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","erlang","hacktoberfest"],"created_at":"2024-09-30T15:07:55.369Z","updated_at":"2025-10-07T01:30:18.274Z","avatar_url":"https://github.com/AdRoll.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# erlcloud: AWS APIs library for Erlang #\n\nThis library is not developed or maintained by AWS thus lots of functionality is still missing comparing to [aws-cli](https://aws.amazon.com/cli/) or [boto](https://github.com/boto/boto).\nRequired functionality is being added upon request.\n\nService APIs implemented:\n- Amazon Elastic Compute Cloud (EC2)\n- Amazon EC2 Container Service (ECS)\n- Amazon Simple Storage Service (S3)\n- Amazon Simple Queue Service (SQS)\n- Amazon SimpleDB\n- Amazon Mechanical Turk\n- Amazon CloudWatch (MON)\n- Amazon CloudSearch\n- Amazon Inspector\n- Amazon Key Management Service (KMS)\n- Amazon DirectConnect\n- Amazon DynamoDB \u0026 DDB streams (ddb2)\n- Amazon Autoscaling (AS)\n- Amazon CloudTrail (CT)\n- Cloud Formation (CFN)\n- Config\n- ElasticLoadBalancing (ELB)\n- Identity and Access Management (IAM)\n- Kinesis\n- Glue (Catalog table, Crawlers and Job APIs support)\n- Athena\n- Step Functions (SF)\n- CloudWatch\n- MechanicalTurk\n- Simple DB (SDB)\n- Relational Data Service (RDS)\n- Simple Email Service (SES)\n- Short Token Service (STS)\n- Simple Notification Service (SNS)\n- Web Application Firewall (WAF)\n- AWS Cost and Usage Report API\n- and more to come\n\nMajority of API functions have been implemented.\nNot all functions have been thoroughly tested, so exercise care when integrating this library into production code.\nPlease send issues and patches.\n\nThe libraries can be used two ways:\n- either you can specify configuration parameters in the process dictionary. Useful for simple tasks\n- you can create a configuration object and pass that to each request as the final parameter. Useful for Cross AWS Account access\n\n## Roadmap ##\n\nBelow is the library roadmap update along with regular features and fixes.\n\n- 3.0.X\n  - ~~Remove R16 support~~ __done__\n  - Support maps\n\n- 3.X.X\n  - Fix dialyzer findings and make it mandatory for the library\n  - Only SigV4 signing and generalised in one module. Keep SigV2 in SBD section only\n  - No more `erlang:error()` use and use of regular tuples as error API. Breaking change.\n\n### Major API compatibility changes between 0.13.X and 2.0.x\n - ELB APIs\n - ... list to be filled shortly\n\n### Supported Erlang versions\nAt the moment we support the following OTP releases:\n - 19.3\n - 20.3\n - 21.1\n \nit might still work on 17+ (primariliy due to Erlang maps) but we do not guarantee that. \n\n## Getting started ##\nYou need to clone the repository and download rebar/rebar3 (if it's not already available in your path).\n```\ngit clone https://github.com/erlcloud/erlcloud.git\ncd erlcloud\nwget https://rebar3.s3.amazonaws.com/rebar3\nchmod a+x rebar3\n```\nTo compile and run erlcloud\n```\nmake\nmake run\n```\n\nIf you're using erlcloud in your application, add it as a dependency in your application's configuration file.\nTo use erlcloud in the shell, you can start it by calling:\n\n```\napplication:ensure_all_started(erlcloud).\n```\n### Using Temporary Security Credentials\n\nThe access to AWS resource might be managed through [third-party identity provider](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp.html).\nThe access is managed using [temporary security credentials](http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html).\n\nYou can provide your amazon credentials in OS environmental variables\n\n```\nexport AWS_ACCESS_KEY_ID=\u003cYour AWS Access Key\u003e\nexport AWS_SECRET_ACCESS_KEY=\u003cYour AWS Secret Access Key\u003e\nexport AWS_SESSION_TOKEN=\u003cYour AWS Security Token\u003e\nexport AWS_DEFAULT_REGION=\u003cYour region\u003e\n```\nIf you did not provide your amazon credentials in the OS environmental variables, then you need to provide configuration read from your profile:\n```\n{ok, Conf} = erlcloud_aws:profile().\nerlcloud_s3:list_buckets(Conf).\n```\nOr you can provide them via `erlcloud` application environment variables.\n```erlang\napplication:set_env(erlcloud, aws_access_key_id, \"your key\"),\napplication:set_env(erlcloud, aws_secret_access_key, \"your secret key\"),\napplication:set_env(erlcloud, aws_security_token, \"your token\"),\napplication:set_env(erlcloud, aws_region, \"your region\"),\n```\n### Using Access Key ###\nYou can provide your amazon credentials in environmental variables.\n```\nexport AWS_ACCESS_KEY_ID=\u003cYour AWS Access Key\u003e\nexport AWS_SECRET_ACCESS_KEY=\u003cYour AWS Secret Access Key\u003e\n```\nIf you did not provide your amazon credentials in the environmental variables, then you need to provide the per-process configuration:\n```\nerlcloud_ec2:configure(AccessKeyId, SecretAccessKey [, Hostname]).\n```\nHostname defaults to non-existing `\"ec2.amazonaws.com\"` intentionally to avoid mix with US-East-1\nRefer to [aws_config](https://github.com/SemanticSugar/erlcloud/blob/HEAD/include/erlcloud_aws.hrl) for full description of all services configuration.\n\nConfiguration object usage:\n```\nEC2 = erlcloud_ec2:new(AccessKeyId, SecretAccessKey [, Hostname])\nerlcloud_ec2:describe_images(EC2).\n```\n\n### aws_config\n[aws_config](https://github.com/SemanticSugar/erlcloud/blob/HEAD/include/erlcloud_aws.hrl) record contains many valuable defaults,\nsuch as protocols and ports for AWS services. You can always redefine them by making new `#aws_config{}` record and\nchanging particular fields, then passing the result to any erlcloud function.\nBut if you want to change something in runtime this might be tedious and/or not flexible enough.\n\nAlternative approach is to set default fields within the `app.config -\u003e erlcloud -\u003e aws_config` section and\nrely on the config, used by all functions by default.\n\nExample of such app.config:\n\n```erlang\n[\n  {erlcloud, [\n      {aws_config, [\n          {s3_scheme, \"http://\"},\n          {s3_host, \"s3.example.com\"}\n      ]}\n  ]}\n].\n```\n\n\n### Basic use ###\nThen you can start making api calls, like:\n```\nerlcloud_ec2:describe_images().\n% list buckets of Account stored in config in process dict\n% of of the account you are running in.\nerlcloud_s3:list_buckets().\nerlcloud_s3:list_buckets(erlcloud_aws:default_cfg()).\n% List buckets on 3d Account from Conf\nerlcloud_s3:list_buckets(Conf).\n```\n\nCreating an EC2 instance may look like this:\n```erlang\nstart_instance(Ami, KeyPair, UserData, Type, Zone) -\u003e\n    Config = #aws_config{\n            access_key_id = application:get_env(aws_key),\n            secret_access_key = application:get_env(aws_secret)\n           },\n\n    InstanceSpec = #ec2_instance_spec{image_id = Ami,\n                                      key_name = KeyPair,\n                                      instance_type = Type,\n                                      availability_zone = Zone,\n                                      user_data = UserData},\n    erlcloud_ec2:run_instances(InstanceSpec, Config).\n```\n\nFor usage information, consult the source code and https://hexdocs.pm/erlcloud.\nFor detailed API description refer to the AWS references at:\n\n- http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Welcome.html\n- http://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html\n- and other services https://aws.amazon.com/documentation/\n\n## Notes ##\n\nIndentation in contributions should follow indentation style of surrounding text.\nIn general it follows default indentation rules of official erlang-mode as provided by OTP team.\n\n## Best Practices ##\n\n- All interfaces should provide a method for working with non-default config.\n- Public interfaces with paging logic should prefer `{ok, Results, Marker}` style to the `{{paged, Marker}, Results}` found in some modules.\nIn case of records output, tokens should be part of the record.\n- Passing next page `NextToken`, `NextMarker` is preferred with `Opts` rather than a fun parameter like found in many modules.\n- Public interfaces should normally expose proplists over records. All new modules are preferred to have both. \n- Exposed records are to be used only for complex outputs. Examples to follow: ddb2, ecs.\n- Library should not expose any long running or stateful processes - no gen_servers, no caches and etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadroll%2Ferlcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadroll%2Ferlcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadroll%2Ferlcloud/lists"}