If you’re just wanting to get started with CPA Affiliate Marketing, it may seem overwhelming just to get your first campaigns going on a tight budget due to the number of subscription services you need to sign up for (tracker, spy tool, website hosting, etc.).

This year I want to show people how to get started promoting CPA offers with the cheapest essential services, so you can use the rest of your starting budget to buy traffic and learn affiliate marketing as fast as possible.

After signing up for a free tracker, you’re going to want to set up hosting for the landing pages that you will use in your campaign. There are literally hundreds of different hosting providers, which vary by cost, speed, etc.

Today I’m going to show you how to set up CPA affiliate landing pages using Amazon’s S3 static website hosting, and CloudFront (Amazon’s CDN network) to host lightning fast landers.

Why Amazon S3 + CloudFront?

With hundreds of hosting options available, why is Amazon S3 and CloudFront the best option for hosting your first landing pages?

Amazon’s services are extremely cheap, and you only pay for what you use. You can view the pricing for all their services here.

Apart from being really cheap, they offer a FREE pricing tier for one year after you open your account. This can immediately help with your cash flow by allowing you more money each month from your budget to spend on campaigns.

Who doesn’t like free?

The other reason Amazon is a good choice for hosting your landing pages is speed. The speed of your landing pages is critical for CPA marketing. If you have slow pages you’ll struggle to get a good ROI.

Amazon has data centers around the world, making your landing pages load fast no matter what country your visitors are from.

They load quite fast with just the S3 service, but if we couple it with their CDN network (CloudFront) then they can be as much as 70% faster.

Ready to use Amazon S3 and CloudFront for your website hosting? Let’s go!

How To Set Up Amazon S3 + CloudFront


  • AWS Account
  • Namecheap Account (or another domain registrar account)
  • A domain name

In order to follow this guide completely, you are going to want to have an AWS account, a domain, and a Namecheap account. If you don’t have a Namecheap account you can still follow the guide, but you will have to figure out the Namecheap steps on your own at your domain registrar.

Step 1: Forward Namecheap Emails

Because we are going to make the website secured by SSL (HTTPS), we need to take a few steps in Namecheap before we apply for the free SSL certificate from Amazon.

  1. Login to your Namecheap account.
  2. Find the domain you’d like to forward emails from. Click ‘Manage’.
  3. On the ‘Domain’ tab (should be the default tab after step 2), scroll down to the ‘Redirect Email’ section.
  4. Click ‘ADD CATCH-ALL’ and in the ‘Forward to’ box type your email address.

NOTE: You may need to wait up to 60 minutes for the settings to work before continuing with step 2. You can test if it works by sending an email to your domain (i.e. admin@example.com).

Step 2: Generate Free SSL Certificate

  1. Go to the ACM Dashboard and click “Request a Certificate”.
  2. Enter your custom domain name and your domain name prepended with *., then click “Review and Request”.(i.e. *.example.comand example.com.)
  3. Check your email and click on the approval link. Then click “I Approve” on the approval screen you’ll be shown.
  4. If you return to the ACM Dashboard, you should see that your certificate has been issued.

Note: You must wait for your certificate to be “issued” before doing the following steps. If you don’t you may run into issues when trying to connect the certificate to CloudFront.

Step 3: Configure S3 Bucket for Static Site

  1. Go to the S3 Dashboard and click “Create Bucket”.
  2. Enter the name of the bucket. Use the domain name, but DO NOT use . in the bucket name. Use - instead. Click “Create”.

See example below with example.com.

Step 4: Fix Bucket Permissions

  1. Select the bucket you just created in the S3 dashboard.
  2. Click on the “Permissions” tab.

3. On the “Public Access Settings” page, click “Edit”.

4. Uncheck both boxes under “Manage public bucket polices for this bucket”. Click “Save”. 

5. On the same “Permissions” tab from the previous step(s), navigate to the “Bucket Policy”. Paste the code below. Edit the “Resource” key with the name of your bucket (example-com).

{ "Version": "2012-10-17", "Statement": [ { "Sid": "AddPerm", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::example-com/*" } ] }

Step 5: Enable Static Website Hosting

  1. Select the bucket in the S3 dashboard.
  2. Go to the “Properties” tab.
  3. Select “Static website hosting”. (it will be “Disabled” when you visit this screen)

4. Select the radio button “Use this bucket to host a website”. In both the index and error document fields, enter index.html. Click “Save”. (make note of the “endpoint” on this step.)

Step 6: Enable CloudFront Distribution

  1. Go to the CloudFront Dashboard and click “Create Distribution”.
  2. Under the “Web” distribution method, click “Get Started”.
  3. In the “Origin Domain Name” box, paste your S3 URL. Don’t select the dropdown that may auto populate, as it may cause issues. The “Origin ID” should auto populate.
  4. In the “Default Cache Behavior Settings,” select Redirect HTTP to HTTPS. Leave the rest of the settings under “Default Cache Behavior Settings” alone.

5. In the next section titled “Distribution Settings,” you need to enter your custom domain name. Enter both example.comand *.example.com. These should be the same domain names you already requested SSL certificates for.
6. For SSL Certificate type choose “Custom SSL Certificate”; a text box should appear.
7. Select your SSL Certificate in the text box.

8. Scroll to the bottom of the page and click “Create Distribution”.
9. Make note of your “Domain Name” when returned to the CloudFront dashboard.

Step 7: CNAME from Namecheap to CloudFront

  1. Login to your Namecheap account.
  2. Find the domain you are going to use with CloudFront. Click ‘Manage’.
  3. Go to the “Advanced DNS” tab and find the “Host Records” section.
  4. Click “Add New Record”, select “CNAME”. In “Host” type @ and for the “Target” paste your CloudFront URL/Domain Name. (Note: some people have had issues using “@” for the host like I do, so try “www” if it doesn’t work.)

5. Click the green check mark.
6. Wait 60 minutes (probably less).

Step 8: Upload Landing Pages

Now you’ve created your ‘server’ and configured it to work with a CDN. You just need to upload your landing pages to your S3 bucket.

If you don’t have landing pages to upload, I recommend checking out PureLander landing page builder to quickly make pages for CPA affiliate marketing.

  1. Go to the S3 dashboard.
  2. Upload your files. You can use folders to keep everything organized.
  3. Once you upload a landing page you can view it by typing your domain name followed by the folder structure of you organized it in. For example… example.com/lander1/index.html

If you have any questions about this guide, please feel free to leave a comment below and I’ll answer it as soon as I can.

    22 replies to "Setup Amazon S3 + CloudFront to Host CPA Affiliate Landing Pages That Are Lightning Fast"

    • Lee

      I followed all the instructions and everything is good until step 6.7, it just won’t let me select “Custom SSL Certificate”. Why?

      • nick

        In Step 2 did your certificate get ‘issued’?

        If you did the next few steps really fast the only thing I could think of is that the Amazon systems didn’t update that you have a valid certificate fast enough. Maybe wait 20 min or so and try again? If that doesn’t work, I’d try logging out and logging back in. If it still won’t work then try clearing your cookies or even try a different browser.

        Finally, if none of that works then you can try contacting Amazon support. I’ve never ran into that issue. They shouldn’t charge you for support because it’s an issue with their interface.

        • Lee

          Yes, it did get issued, however, the differences is the “in use” is shown as “no”, and the “Renewal eligibility” is shown as “Ineligible”. I am on the free basic plan, so I don’t get the chance to send the support a ticket, I guess…sigh.

          • nick

            I don’t think the ‘in use’ and ‘ineligible’ should matter. Are the CNAMES you’re trying to use the same as what’s in the SSL certificate?

            Regarding the support, I believe you can still ask for help. I’ve had to send them a few tickets and was on a free plan and they didn’t charge me.

            • Lee

              It’s working now. I deleted the previously created bucket and recreate another one and was able to create the distribution with no problem. Thanks for your help man, cheers!

            • nick

              @Lee Glad you got it all sorted out and thanks for coming back to post the solution in case anyone else has that issue in the future.

    • Kyle E Wood

      I am having the same problem listed above. I have already gone back and deleted the bucket and went through the whole process again. When I put in my domain names it does not let me choose custom SSL.

      • nick

        Hey Kyle,

        I’m not sure what causes that issue. I’ve never ran into it when following the steps above.


    • donnell

      when I put my domain name into the resource tab and click save it gives me the error “unknown field example-com” . And yes I replaced my domain name with “example” in “example.com”. I have tried re-writing the code by hand but can’t fin any troubleshooting ideas online

      • donnell

        Oh and this is in step 3.5 by the way

        • nick

          I think you’re on the bucket policy step? If that the case then you replace just “example-com” with whatever you called your bucket in the step above.

          So that line would then look like:

          “Resource”: “arn:aws:s3:::yourbucketname-com/*”

    • Konstantin

      Thank you so much!

    • Konstantin

      For everyone having an issue with SSL Certificate on step 6.6 – be sure when you were on step 2 this option was set to N.Virginia!

      screenshot: https://i.ibb.co/xzcWtf6/SSL-cert.jpg

      If you have an issue on step 6.6 (SSL Certificate is grayed out) – issue a new SSL certificate with N.Virginia set on the issuing screen, as shown on a screenshot.

    • deema

      Hi Nick,

      You have more than AMAZING BLOG,

      I want just to understand if my domain is now secure, is the ssl active



      Also not sure why when I upload the landing page to S3, the page photos disappear as you see in the link, despite it opens when i open index.html on my desktop, any advise?

      • nick

        Hey Deema,


        I’m not sure if your domain is secure, as there isn’t any content on it. If I load it in my browser I just get the namecheap page that says it’s registered.

        The screenshot is secure, but it seems that you’re not using your custom domain there. Instead, the Amazon url is being used. The page should load on your domain and if you see the lock in the address bar it’s secure.

        Regarding the photos disappearing, it could be a couple of problems:
        1. You aren’t uploading the photos to s3.
        2. The links to the photos aren’t correct. You may want “photo.jpg”, but your src might actually be like “…/photo.jpg”, which would work on your desktop, but not once it’s uploaded.

    • amal

      @nick many thanks for your support,

      how I can resolve this my domain to cover the Amazon domain?

      • nick

        You need to complete steps 6 and 7 of this guide.

    • Journey66

      One) I ran into the same problem with the Custom SSL Certificate option radio button not be available (step 6.7).

      Below it is the “Request or Import a Certificate with ACM” button.

      I clicked on this and followed the previous steps again in creating an SSL cert, approved it via email, and then the new cert was available in the Custom SSL Certificate option. Easy fix!

      Two) In setting the CNAME record in NameCheap (8.4) I typed in for Host “@blahblah.cloudfront.net”…which it didn’t like.


      Corrected it to: Host @ Target blahblah.cloudfront.net

      Worked perfectly after that.

      Tremendous blog, @Nick!

    • Ajibola

      Can i host landers fro pure landers on my wordpress website?

      • nick

        You could, but you’d need a special plugin to upload HTML files, or just upload them to the root directory of your server. I personally wouldn’t do either.

        Amazon is free for a year unless you buy huge amounts of traffic. Then, it’s super cheap. Like a few bucks a month.

    • Ryan

      Hi Nick,

      Thank you for your guide.

      I had originally followed vortex’s guide from the STM forum. It’s more or less the same guide as yours except for a few extra steps and I’m curious why your guide has them listed.

      In step 3.2 you say to use a “-” instead of a “.” in the domain name. Why is this? The guide in STM doesn’t say to do this and hosting works fine.

      The other step was Step 5: Enable Static Website Hosting. This isn’t in the STM guide either and again static hosting works fine without doing this step.

      One would think you’d need to enable static website hosting for it to work but hosting works fine with this setting disabled. I never knew this setting was even there until I read your guide.

      Your guide also says in step 5.4 “make note of the “endpoint” on this step” with the endpoint URL highlighted in your screenshot stating to save it for later. Where at in your guide did you use this URL? It’s the cloudfront URL that is used for the CNAME in your DNS.

      What are your thoughts?

      • nick

        Hey Ryan,

        When I was first trying to do this the first time I didn’t find any guides online, so I had to figure out all the steps on my own. This is what I came up with and the exact step by step guide I follow when I’m setting up my own bucket when I need a new one.

        In regards to 3.2… I found it mentioned a few times that this can potentially cause issues (these issues could be resolved by now though), so I don’t use a .

        Step 5 was what I thought was needed when I was researching how to do this. I still do it on all my buckets.

        For step 5.4 you paste that URL in step 6. See screenshot (red text).

        Thanks for the comment.


Leave a Reply

Your email address will not be published.