Home > > Newbie Follow-Alongs

Setup version control and continuous deployment for LPs using AWS (12)


09-15-2019 08:41 PM #1 amomaxia (Member)
Setup version control and continuous deployment for LPs using AWS

Decided to post this on request from @micoangelo
Hey guys so we've been following along Vortex's 40 day tutorial and as developers we wanted to use AWS S3 to host our LPs.
We also wanted to be able to edit our LPs at the same time, push up code via terminal, use version control w/ git etc.

The benefits of using Version Control are massive (lets you maintain versioning of your landing pages, multiple ppl can work on LPs at the same time, can revert back and keep track of changes, quick and easy deployments to S3).
This might be a little overkill for most people but if you have a development background or just want to learn how to do some basic version control this is really dope.








Another note:
We keep two repos. One that we hold all of our LPs on (basically the templates). One that we have linked up to S3 like above.
This lets us edit LPs, toss cleaned up versions w/converting scripts into our LP repo. Then just edit them per offer/campaign and toss them into the S3 repo.
Kinda just our own strategy but up to you guys how you want to set yours up.


09-15-2019 09:52 PM #2 micoangelo (Member)

This is huge guys! Thank you!

Non-developers may not understand why go through the hassle...

But there's a reason the software industry does this as industry standard practice! (https://www.atlassian.com/git/tutori...ersion-control)

If you make constant split tests and tweaks to your LP's (which you should be doing) this will make it all a lot easier to keep track of.


09-16-2019 12:20 AM #3 vortex (Senior Moderator)

Wow - this IS huge! Thanks a ton @amomaxia for taking the time to type out all the steps, and thanks to @micoangelo for asking for details in the first place!

Will link to this from the tutorial.



Amy


09-16-2019 01:12 AM #4 jaybot (Veteran Member)

This is awesome. I hope to be at this stage someday

For now, edit in Sublime. Save. Drag and drop into s3 bucket in browser (TTL set to 0).

Iterations just get a new folder + new lander in tracker.

I know. I'm lazy. Git is better. Especially when doing huge A/B testing.

I'd argue that my way is still better than CVS/SVN tho :P


09-16-2019 03:15 PM #5 Mr Baffoe (Veteran Member)

Great post!

For those of you scared off by messing with the terminal, there’s a git GUI. Although I recommend learning the command line too.

https://desktop.github.com/

Option two would be to use vscode which also has git integrated.
https://code.visualstudio.com/


09-19-2019 01:17 AM #6 nickpeplow (AMC Alumnus)

We use deploybot.com, intergrates with pretty much everything (even Shopify themes)

There is a little bit of a learning curve with github, but it’s super worth it


Sent from my iPhone using STM Forums mobile app


09-19-2019 04:36 AM #7 thedudeabides (Moderator)

Smart moves. I got frustrated by the slow process of launching campaigns as a solo affiliate so nowadays I use:

Netlify + Hugo framework + vscode and love it. To make an edit or new LP, it's just two git commands to push it to live within vscode. Still use a terminal to preview pages locally with Hugo.


05-30-2020 01:06 PM #8 fastaj (Member)

This is just so awesome.

Literally manage to have higher quality, higher reliability AND save time.

Truly the trifecta.


12-01-2020 11:27 AM #9 jeremie (Moderator)

Anyone found a way to automatically invalidate the CloudFront distribution for the modified files?
I am thinking to code a lambda function, but if there is a better / easier way, I will be glad to know before spending several hours to create this.


12-01-2020 11:51 AM #10 platinum (Veteran Member)

Quote Originally Posted by jeremie View Post
Anyone found a way to automatically invalidate the CloudFront distribution for the modified files?
I am thinking to code a lambda function, but if there is a better / easier way, I will be glad to know before spending several hours to create this.
I'm just using the one from AWS UI for small rare changes, but I guess you're looking for something automatic to handle multiple files and directories in automatic, right?


12-01-2020 12:21 PM #11 jeremie (Moderator)

Quote Originally Posted by platinum View Post
I'm just using the one from AWS UI for small rare changes, but I guess you're looking for something automatic to handle multiple files and directories in automatic, right?
Yes, fully automatic.

So far the closest solution I found is this, ie binding a lambda to a S3 event notification:
https://kupczynski.info/2019/01/09/i...lambda-s3.html

I will probably build something on top of that.


12-18-2020 07:27 PM #12 jeremie (Moderator)

Quote Originally Posted by jeremie View Post
Yes, fully automatic.

So far the closest solution I found is this, ie binding a lambda to a S3 event notification:
https://kupczynski.info/2019/01/09/i...lambda-s3.html

I will probably build something on top of that.
If someone is interested, I finally ended up 1) pushing all files names to an AWS SQS queue, 2) triggering a lambda function to fetch all SQS messages and determine which directories to invalidate, and 3) sending CloudFront invalidation.
It took me way too long and I don't recommend bothering with that, unless you want to learn AWS queues :-)


Home > > Newbie Follow-Alongs