Skip to content

Commit

Permalink
Docs, Version
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleaa committed Jan 27, 2024
1 parent 81bc3cd commit d5742fc
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v0.8.0
- Enhancement: Support IMDSv2 (Requires ExAws 2.3.2 minimum) https://github.com/kyleaa/libcluster_ec2/pull/33

v0.7.0
- Enhancement: auto reconnect when disconnected by some reason https://github.com/kyleaa/libcluster_ec2/pull/27
- Dependency Cleanup: Remove Poison dependency https://github.com/kyleaa/libcluster_ec2/pull/23
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,26 @@ def deps do
[{:libcluster_ec2, "~> 0.5"}]
end
```

## AWS IAM Requirements

Instances must have an instance role attached. There are two permissions required:
* `ec2:DescribeInstances` - Required to determine tag values of the current running instance. Can be restricted by Resource to the current instance running the application
* `ec2:DescribeTags` - Required to identify other instances with the same tags

```
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeTags"
],
"Resource": "*"
}
]
}
```
2 changes: 1 addition & 1 deletion lib/libcluster_ec2.ex
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ defmodule ClusterEC2 do
|> String.slice(0..-2//1)
end

def get_metadata(path) do
defp get_metadata(path) do
ExAws.Config.new(:ec2)
|> ExAws.InstanceMeta.request("http://169.254.169.254/latest/meta-data#{path}")
end
Expand Down

0 comments on commit d5742fc

Please sign in to comment.