- example: using bash (aws cli sdk)
- example: using php (aws php sdk v3.*)
- you need to add example.com as custom auth provider in aws console (cognito/federated)
| -- This creates an athena table that can parse ALB logs. | |
| -- Advantage of this over others are this works when the log ends with a trailing space | |
| -- plus it also breaks the http request into route and params for easier grouping | |
| CREATE EXTERNAL TABLE IF NOT EXISTS alb_logs ( | |
| type string, | |
| timestamp string, | |
| elb string, | |
| client_ip string, | |
| client_port int, |
| // 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
| const axios = require('axios'); // promised based requests - like fetch() | |
| function getCoffee() { | |
| return new Promise(resolve => { | |
| setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
| }); | |
| } |
| <?php | |
| $token = "<device-token>"; | |
| $message = array( | |
| 'aps' => array( | |
| 'alert' => 'hi there', | |
| 'badge' => 1, | |
| 'sound' => 'default' | |
| ) | |
| ); |
| rds-modify-db-parameter-group {param-group-name} \ | |
| --parameters="name=character_set_server, value=utf8, method=pending-reboot" \ | |
| --parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \ | |
| --parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
| --parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
| --parameters="name=query_cache_type, value=1, method=pending-reboot" \ | |
| --parameters="name=query_cache_size, value=131072, method=pending-reboot" \ | |
| --parameters="name=table_open_cache, value=2500, method=pending-reboot" \ | |
| --parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \ | |
| --parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \ |