Tags » Amazon RDS

aws lambda function timed out when querying data from MySQL database

I have an index.js file which contains code like the following:

const dbConfig = require('./config/dbConfig')
const mysql = require('mysql')

var con = mysql.createConnection({
  host: dbConfig.host,
  user: dbConfig.username,
  password: dbConfig.password,
  database: dbConfig.database
})

function readMessages (event, context, callback) {
  console.log('function triggered')
  con.connect((err) => {
    if (err) {
      console.error(err)
      callback(err)
    } else {
      console.log('Connected!')
      con.query('SELECT * FROM Messages WHERE isDeleted = 0;', (err, result, fields) => {
        if (err) {
          console.error(err)
          callback(err)
        } else {
          console.log(result)
          con.end()
          callback(null, result)
        }
      })
    }
  })
}

exports.handler = readMessages
… 190 more words
Amazon-web-services

Importing MYSQL table to RDS from a csv file

I have been searching all over the web and have been unable to find a solution to the following issue.
I need to automate a simple CSV file import into an RDS MySQL database. 129 more words

Amazon-web-services

New AWS RDS SQL Server Instance - Permissions for master user

I have successfully created an AWS RDS SQL Server 2016 instance. I specified a master user name and password. I was able to log into that instance via SSMS using the master user name and password. 86 more words

Amazon-web-services

Amazon RDS MySQL: setting user names and passwords

I’m trying to allow an application to connect via a connection string, and am having no luck; the application asks for a password. The only password I can find in the console is for the root user (which I guess is also the master password). 246 more words

Amazon-web-services

Unable to access RDS Database via IAM Authentication

I’m unable to connect to my RDS database with an IAM user.
Database username: master
IAM User: api-user
I have assigned the User Programmatic access and added following policies to the user: 768 more words

Amazon-web-services

Audit schema changes in a MySQL table

I have a requirement where in I need to audit all the changes to a MYSQL table (version 5.7). I was able to find solutions with triggers for INSERT/UPDATE/DELETE operations on the table. 90 more words

Amazon-web-services

Do I give only the read-only RDS database permission for an aws lambda code, when I create custom role and edit the policy document this way?

I want to create an aws lambda code, which provides a public API for only read from an aws rds db instance. When I want to create a lambda function, it asks me about permission roles. 387 more words

Amazon-web-services