asp.net - Elastic Beanstalk w/ Associated RDS; Unable to find/access RDS related environment variables -


i've created new elastic-beanstalk environment associated rds (ms sql express). able connect rds instance local machine using microsoft sql server management studio using master account credentials provided @ setup. however, having hard time accessing "rds environment" variables supposed available application.

here example outlined in aws's docs:

  var appconfig = configurationmanager.appsettings;   string dbname = appconfig["rds_db_name"];    if (string.isnullorempty(dbname)) return null;    string username = appconfig["rds_username"];   string password = appconfig["rds_password"];   string hostname = appconfig["rds_hostname"];   string port = appconfig["rds_port"];    return "data source=" + hostname + ";initial catalog=" + dbname + ";user id=" + username + ";password=" + password + ";"; 

my project asp.net core 1.1 project. when attempt access these values using configuration.getvalue<string>("rds_db_name");, recieve null/empty string values.

here ebs configuration settings:

scaling:

  • environment type: load balanced, auto scaling
  • number instances: 1-4

instances:

  • instance type: t1.micro

software configuration:

  • enable 32-bit applications: false
  • target .net runtime: 4.0

rds:

  • endpoint: xxx:1433
  • engine: sqlserver-ex
  • instance class: db.t2.micro
  • storage: 30gb
  • multi availability zone: false
  • when environment deleted: data lost

  1. how access these values application?
  2. how access these values when rdp'd ec2 instance?
  3. why master account show single database named rdsadmin has tables? application's db???
  4. why aren't these values visible or manageable via eb dashboard?

any , appreciated.

update

create small snippet view configuration key/values. output contained environment variables, none appeared specific rds instance.

 var allkeys = "";  foreach (iconfigurationsection conf in configuration.getchildren().tolist())  {      allkeys += "key: " + conf.key + "; value: " + conf.value + "; path: " + conf.path + "<br />";  } 


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -