Skip to content

Commit d5742fc

Browse files
committed
Docs, Version
1 parent 81bc3cd commit d5742fc

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
v0.8.0
2+
- Enhancement: Support IMDSv2 (Requires ExAws 2.3.2 minimum) https://github.com/kyleaa/libcluster_ec2/pull/33
3+
14
v0.7.0
25
- Enhancement: auto reconnect when disconnected by some reason https://github.com/kyleaa/libcluster_ec2/pull/27
36
- Dependency Cleanup: Remove Poison dependency https://github.com/kyleaa/libcluster_ec2/pull/23

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,26 @@ def deps do
2727
[{:libcluster_ec2, "~> 0.5"}]
2828
end
2929
```
30+
31+
## AWS IAM Requirements
32+
33+
Instances must have an instance role attached. There are two permissions required:
34+
* `ec2:DescribeInstances` - Required to determine tag values of the current running instance. Can be restricted by Resource to the current instance running the application
35+
* `ec2:DescribeTags` - Required to identify other instances with the same tags
36+
37+
```
38+
{
39+
"Version": "2012-10-17",
40+
"Statement": [
41+
{
42+
"Sid": "VisualEditor0",
43+
"Effect": "Allow",
44+
"Action": [
45+
"ec2:DescribeInstances",
46+
"ec2:DescribeTags"
47+
],
48+
"Resource": "*"
49+
}
50+
]
51+
}
52+
```

lib/libcluster_ec2.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defmodule ClusterEC2 do
1717
|> String.slice(0..-2//1)
1818
end
1919

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

0 commit comments

Comments
 (0)