Interact with AWS S3 on Vagrant Host Machine

21 views
Skip to first unread message

Jamie Jackson

unread,
Apr 13, 2017, 5:18:26 PM4/13/17
to vagra...@googlegroups.com
In my vagrant provisioning process, on the host, I need to pull a database backup off of AWS S3.

I see a couple of ways to do it:
  • I can call out to the `aws` CLI (installed on the host)
  • I could do it through some ruby S3 API.
Doing it on the host, I can leverage the S3 configuration (keys) that already exist on my team's host machines.

I could use some feedback on a decent way to accomplish this.

Thanks,
Jamie


Alvaro Miranda Aguilera

unread,
Apr 14, 2017, 3:18:47 PM4/14/17
to vagra...@googlegroups.com
Hello

Not sure if you want to pull a db everytime you want to create a project, what about creating a new base box?

with packer you can build a box, and run shell-local provisioner that will run in the host.

For vagrant, you can check into vagrant-triggers plugin, and run on the host some command before up






--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CA%2BonWPcJxXFABxRFM%3DTAixnnZiDJVxy0aimWqKObW9tjRW65wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Jamie Jackson

unread,
Apr 14, 2017, 5:08:51 PM4/14/17
to vagra...@googlegroups.com
I ended up using aws-sdk, and those operations are running in a provision trigger (it only pulls if there isn't a local copy already, BTW). I wanted to avoid coupling that part with a box.

Reply all
Reply to author
Forward
0 new messages