timkay / aws

Easy command line access to Amazon EC2, S3, SQS, ELB, and SDB
http://timkay.com/aws/
424 stars 123 forks source link

Feature Request: Add RDS support #79

Open robe070 opened 10 years ago

robe070 commented 10 years ago

Hi Tim,

Love the tool. So easy to use.

I would like to add RDS support. Is this something you would like me to add in? Any issues I should be aware of with adding in RDS support?

And I'd like to do it now!

warm regards

Rob

jwestbrook commented 10 years ago

:+1:

being able to script RDS snapshots and copy to another region using a scheduled task would be AWESOME

timkay commented 10 years ago

Rob, it would be great to have RDS support. Please add it and send me a merge request.

(I never used RDS, and I haven't had a chance to do it myself. I originally reached out to AWS to see if they wanted to "help" me contribute these features, but they didn't get back to me. They added features so fast that I couldn't keep up.)

...Tim

robe070 commented 10 years ago

I've made a start I can tag an RDS instance and I can take a DB snapshot and tag it at the same time. I'll work on creating an instance from a snapshot next - the idea being to be able to terminate an instance in the evening and bring it back up the next morning.

robe070 commented 10 years ago

So Issue #80 has implemented the base behaviour I was intending. If anyone wants to pick up the mantle and add more to RDS support go ahead. Not sure if this issue should be closed now

robe070 commented 10 years ago

ps @jwestbrook I've added in copy-db-snapshot and these are my comments. It seems less functional than the AWS console which is unusual. I may have a defect in there:

Only automated snapshots may be copied using this api and they can only be copied FROM the source region to the CURRENT region. At least, thats what works. Maybe I'm using the parameters incorrectly. Note the --region must be the target region.

This copies the automated snapshot 'rds:lansadbinstance-2014-07-22-16-36' from Sydney to N. Virginia and names the target snapshot 'cp-region-snapshot' and tags it type=copy:

cpdbsnap arn:aws:rds:ap-southeast-2:775488040364:snapshot:rds:lansadbinstance-2014-07-22-16-36 -t cp-region-snapshot --tag type=copy --region us-east-1

robe070 commented 10 years ago

It would be good to have some documentation on the rds commands but all of the doco seems to be under Tim's control e.g: AddTagsToResource This is for all kinds of resources so its fully qualified: add-tags-to-resource arn:aws:rds:ap-southeast-2:775488040364:db:loadtestlansa2 --tag Type=Test --tag Platform=x64

where arn:awsd:rds::::

timkay commented 10 years ago

These days I refer people to the wiki. I don't know if you can update the wiki. On Jul 29, 2014 2:36 PM, "Rob Goodridge" notifications@github.com wrote:

It would be good to have some docuemntation on the rds commands but I all of the doco seems to be under Tim's control e.g: AddTagsToResource This is for all kinds of resources so its fully qualified: add-tags-to-resource arn:aws:rds:ap-southeast-2:775488040364:db:loadtestlansa2 --tag Type=Test --tag Platform=x64

where arn:awsd:rds::::

— Reply to this email directly or view it on GitHub https://github.com/timkay/aws/issues/79#issuecomment-50542490.

jwestbrook commented 10 years ago

FYI copying of manual snapshots does work, for example

use create-db-snapshot use create it with whatever identifier you like

to copy the snapshot use this format

aws copy-db-snapshot arn:aws:rds:[SRC REGION]:[AWS ACCOUNT NUMBER]:snapshot:[SRC SNAPSHOT NAME] -t [TARGET SNAPSHOT NAME] --region [TARGET REGION]

just made it work with one of my manual snapshots - thanks for adding this!

robe070 commented 10 years ago

Thanks for getting back to me.

warm regards

Rob Goodridge

On Wed, Aug 6, 2014 at 10:29 AM, Jason Westbrook notifications@github.com wrote:

FYI copying of manual snapshots does work, for example

use create-db-snapshot use create it with whatever identifier you like

to copy the snapshot use this format

aws copy-db-snapshot arn:aws:rds:[SRC REGION]:[AWS ACCOUNT NUMBER]:snapshot:[SRC SNAPSHOT NAME] -t [TARGET SNAPSHOT NAME] --region [TARGET REGION]

just made it work with one of my manual snapshots - thanks for adding this!

— Reply to this email directly or view it on GitHub https://github.com/timkay/aws/issues/79#issuecomment-51279999.