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
- how access these values application?
- how access these values when rdp'd ec2 instance?
- why master account show single database named
rdsadminhas tables? application's db??? - 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
Post a Comment