This gist contains lists of modules available in
in AWS Lambda.
This gist contains lists of modules available in
in AWS Lambda.
I often find myself ssh'ing into my servers and checking my systemd service logs with $ journalctl -f -u {name}.service
. One day I got tired of this and wanted all of my important logs in once place (Amazon AWS Cloudwatch). To my dismay, there weren't any real good tutorials on how to do so. So, voilà.
Overall, it's a fairly simple process consisting of the following few steps.
Open the service file with $ sudo vi /lib/systemd/system/{name}.service
Modify the [Service]
section:
import xlsxwriter | |
import mysql.connector | |
def fetch_table_data(table_name): | |
# The connect() constructor creates a connection to the MySQL server and returns a MySQLConnection object. | |
cnx = mysql.connector.connect( | |
host='localhost', | |
database='schema', | |
user='user', |
# path on linux /usr/share/dbeaver/dbeaver.ini | |
# path on macos /Applications/DBeaverEE.app/Contents/Eclipse/dbeaver.ini | |
-vm | |
/usr/bin/java | |
-startup | |
plugins/org.eclipse.equinox.launcher_1.5.600.v20191014-2022.jar | |
--launcher.library | |
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.1100.v20190907-0426 | |
-vmargs | |
-XX:+IgnoreUnrecognizedVMOptions |