Showing posts with label AWS. Show all posts
Showing posts with label AWS. Show all posts

Saturday, June 30, 2012

AWS - Delete AutoScaling

1. Update your active auto scaling group with miz-size 0 and max size 0 with the below command. You should have AWS auto scaling command line tools installed.  You can follow my blog post  to setup command line tools.
$ as-update-auto-scaling-group prod-scaling-group --min-size 0 --max-size 0

2. Wait for the instances to shutdown.

3. And now delete your auto scaling group
$as-delete-auto-scaling-group pd-prod-scaling-group

Amazon RDS - MySQL - Turn on Slow Log and General Log

Following commands create a new db parameter group for your RDS server and set 
slow_query_log and general_log parameters


You will need to setup RDS tools configured with your keys to execute the below commands


$ rds-create-db-parameter-group slow-log-group -f mysql5.1 -d "This is created to enable slow query logging and a few other db parameters"

$ rds-modify-db-instance pd-rds-server --db-parameter-group-name slow-log-group --apply-immediately

$ rds-modify-db-parameter-group slow-log-group --parameters "name=slow_query_log, value=ON, method=immediate" --parameters "name=long_query_time, value=1, method=immediate" --parameters "name=min_examined_row_limit, value=100, method=immediate" "name=general_log, value=ON, method=immediate"

$ rds-describe-db-parameters slow-log-group

$ rds-reboot-db-instance pd-rds-server 

Setting up git client for AWS EBS environment in windows machine

Prerequisites
1. Git should be installed
2. Powershell 2.0 should be installed
3. AWSDevTools-OnetimeSetup.bat must be run.


Setup
1. Create a folder
2. Git Init in the  folder
3. Copy AWSDevTools-RepositorySetup.bat to the current folder
4. Run AWSDevTools-RepositorySetup.bat
5. Delete AWSDevTools 
3. Open Git Bash and cd to the current folder
4. Execute aws.config 
 - Enter AWS credentials
 - Enter AWS Beanstalk application name
 - Enter AWS Beanstalk environment name
5. git add . 
6. git commit -m " Notes here "
7. git aws.push