File tree 3 files changed +9
-2
lines changed
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -358,6 +358,8 @@ will be fetched as necessary and used for connections until it
358
358
expires. The value for : host_region will either use the one provided,
359
359
or if not provided, the environment variable AWS_REGION.
360
360
361
+ You must add the ` aws-sdk-rds ` gem to your bundle to use this functionality.
362
+
361
363
| ` :use_iam_authentication ` | true |
362
364
| --- | --- |
363
365
| ` :username ` | The database username configured to use IAM Authentication |
Original file line number Diff line number Diff line change 1
1
require 'singleton'
2
- require 'aws-sdk-rds'
3
2
4
3
module Mysql2
5
4
class AwsTokenAuth
@@ -10,6 +9,13 @@ class AwsTokenAuth
10
9
TOKEN_EXPIRES_IN = ( 60 *14 ) # 14 minutes
11
10
12
11
def initialize
12
+ begin
13
+ require 'aws-sdk-rds'
14
+ rescue LoadError
15
+ puts "gem aws-sdk-rds was not found. Please add this gem to your bundle to use AWS IAM Authentication."
16
+ exit
17
+ end
18
+
13
19
@mutex = Mutex . new
14
20
# Key identifies a unique set of authentication parameters
15
21
# Value is a Hash
Original file line number Diff line number Diff line change @@ -24,5 +24,4 @@ Mysql2::GEMSPEC = Gem::Specification.new do |s|
24
24
s . metadata [ 'msys2_mingw_dependencies' ] = 'libmariadbclient'
25
25
26
26
s . add_runtime_dependency 'bigdecimal'
27
- s . add_runtime_dependency 'aws-sdk-rds'
28
27
end
You can’t perform that action at this time.
0 commit comments