File tree Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Expand file tree Collapse file tree 1 file changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,46 @@ Python scripts for AWS using boto3 SDK
5
5
| ---------------------------| ----------------------------------------------------|
6
6
| [ ec2_start.py] ( scripts/ec2_start.py ) | Start all instances with a specific tag |
7
7
| [ ec2_stop.py] ( scripts/ec2_stop.py ) | Stop all instances with a specific tag |
8
- | [ ec2_ip_route53.py] ( scripts/ec2_ip_route53.py ) | Find EC2 public IP and change Route53 'A' record |
8
+ | [ ec2_ip_route53.py] ( scripts/ec2_ip_route53.py ) | Find EC2 public IP and change Route53 'A' record |
9
+
10
+ ## Installation
11
+
12
+ Requires Python and [ boto3] ( https://github.com/boto/boto3 ) .
13
+
14
+ ```
15
+ git clone https://github.com/dmitrijsf/aws-boto3-scripts
16
+ cd aws-boto3-scripts
17
+ pip install -r requirements.txt
18
+ ```
19
+ ## Usage
20
+
21
+ ** Set desired AWS credentials**
22
+
23
+ In this example I am using [ ** aws-vault** ] ( https://github.com/99designs/aws-vault ) to work with desired profile.
24
+
25
+ ```
26
+ ❯ aws-vault add home
27
+ Enter Access Key ID: your-aws-access-key-id
28
+ Enter Secret Access Key: your-aws-access-key
29
+ Added credentials to profile "home" in vault
30
+
31
+ # launches subshell with desired AWS environment variables
32
+ ❯ aws-vault exec -- home
33
+ ```
34
+ ** Launching Scripts**
35
+
36
+ ```
37
+ ❯ cd scripts
38
+ # modify the script according to your needs
39
+ # ec2_ip_route53.py
40
+
41
+ # set instance ID
42
+ instance_id = 'i-0111112233' # Instance ID, e.g. 'i-0111112233'
43
+ # set Hosted Zone ID
44
+ zone_id = 'ZBDAAABBBCCC' # Hosted Zone ID, e.g. 'ZBDAAABBBCCC'
45
+ # domain
46
+ domain = 'technoff.eu' # Domain, e.g. technoff.eu
47
+
48
+ ❯ python ec2_ip_route53.py
49
+ technoff.eu record was changed to: 52.51.120.202
50
+ ```
You can’t perform that action at this time.
0 commit comments