How to Setup Amazon S3 + Cloudfront CDN Rabu, 01 April 2020 Tambah Komentar Edit How to Setup Amazon S3 + Cloudfront CDN - Hosting - Dijsu Forum Jump to content Hosting Dijsu Forum Create Topic Event 0 Notification Settings Notifications 0 Compose New Messages zipoart88 Content Profile My Attachments Settings Manage Followed Content Account Settings Ignored Users Sign Out Search In Everywhere Topics This Forum This Topic More options... Find results that contain... Any of my search term words All of my search term words Find results in... Content titles and body Content titles only Browse Forums Calendar Staff Online Users Leaderboard More Activity All Activity My Activity Streams Default Streams Unread Content Content I Started Content I Follow Members I Follow Content I Posted In Create New Stream Unread Content Content I Started Search More More More Unread Content Mark site read Home Technical Hosting How to Setup Amazon S3 + Cloudfront CDN Follow 1 How to Setup Amazon S3 + Cloudfront CDN By Colin Dijs, February 26 in Hosting Reply to this topic Start new topic Recommended Posts Colin Dijs 75 Report post Posted February 26 When I set up Amazon S3 + Cloudfront I used this guide and it worked awesome. It's from nicklenihan.com The only step that didn't go well for me was the ssl on 6.7 but it didn't show to be a problem at all. 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. 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 Requirements: 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. Login to your Namecheap account. Find the domain you’d like to forward emails from. Click ‘Manage’. On the ‘Domain’ tab (should be the default tab after step 2), scroll down to the ‘Redirect Email’ section. 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 Go to the ACM Dashboard and click “Request a Certificate”. Enter your custom domain name and your domain name prepended with *., then click “Review and Request”.(i.e. *.example.comand example.com.) Check your email and click on the approval link. Then click “I Approve” on the approval screen you’ll be shown. If you return to the ACM Dashboard, you should see that your certificate has been issued. Step 3: Configure S3 Bucket for Static Site Go to the S3 Dashboard and click “Create Bucket”. Enter the name of the bucket. Use the domain name, but DO NOT use a . in the bucket name. Use a - instead. Click “Create”. See example below with example.com. Step 4: Fix Bucket Permissions Select the bucket you just created in the S3 dashboard. 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 Select the bucket in the S3 dashboard. Go to the “Properties” tab. 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 Go to the CloudFront Dashboard and click “Create Distribution”. Under the “Web” distribution method, click “Get Started”. 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. 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 Login to your Namecheap account. Find the domain you are going to use with CloudFront. Click ‘Manage’. Go to the “Advanced DNS” tab and find the “Host Records” section. Click “Add New Record”, select “CNAME”. In “Host” type @ and for the “Target” paste your CloudFront URL/Domain Name. 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. Go to the S3 dashboard. Upload your files. You can use folders to keep everything organized. 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 1 adam83 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites jrichardw 1 Report post Posted March 20 I'm assuming you ultimately got your SSL linked with your domain by now. For step 6.7 the SSL wasn't showing up for me because the domain was still pending verification--when I requested the cert. My DNS verification NEVER happened. After about an hour, I cancelled the DNS verification and went with email. All I had to do in Namecheap was setup a catch-all forwarding email to my gmail account, and I got the domain verification email. Then I went back through the cloudfront setup and my cert showed in the list because it had switched to the "issued" status. I would recommend this method to anyone, it was very easy to setup. These instructions are very close to the ones I used, but these are better. Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites pascalgi 3 Report post Posted March 20 I used Amazon S3 + Cloudflare instead of Cloudfront. Cloudflare has a free forever plan and seem to have more datacenter. Both are working but I like free stuff! 2 stephane and adam83 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites adam83 11 Report post Posted Sunday at 03:43 AM On 3/20/2020 at 3:13 AM, jrichardw said: I'm assuming you ultimately got your SSL linked with your domain by now. For step 6.7 the SSL wasn't showing up for me because the domain was still pending verification--when I requested the cert. My DNS verification NEVER happened. After about an hour, I cancelled the DNS verification and went with email. All I had to do in Namecheap was setup a catch-all forwarding email to my gmail account, and I got the domain verification email. Then I went back through the cloudfront setup and my cert showed in the list because it had switched to the "issued" status. I would recommend this method to anyone, it was very easy to setup. These instructions are very close to the ones I used, but these are better. Adding to that, it will take up to 25 mins to be activated (SSL) even if the status is "issued" 😉 Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites adam83 11 Report post Posted Sunday at 05:44 PM Hi Folks 🙂 I have a concern here. Do I need to create a new bucket every time I want to add a new landing page or I can upload multiple landing pages within the same bucket ? Thnx Adam Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites sandeepsar 1 Report post Posted Sunday at 08:42 PM 2 hours ago, adam83 said: Hi Folks 🙂 I have a concern here. Do I need to create a new bucket every time I want to add a new landing page or I can upload multiple landing pages within the same bucket ? Thnx Adam One bucket sufficient for per domain. You can make multiple folder in bucket and put your multiple landing page in those folders. 1 adam83 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites adam83 11 Report post Posted Sunday at 08:45 PM 2 minutes ago, sandeepsar said: One bucket sufficient for per domain. You can make multiple folder in bucket and put your multiple landing page in those folders. Thank you. Much appreciated. Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites pascalgi 3 Report post Posted 6 hours ago On 3/29/2020 at 4:44 AM, adam83 said: Hi Folks 🙂 I have a concern here. Do I need to create a new bucket every time I want to add a new landing page or I can upload multiple landing pages within the same bucket ? Thnx Adam Only one bucket per domain and you just have to create folders for your different offers. If you want to split test different landing pages, you just need to add your html file in the same folder. The main file will be index.html and your other LP can be lp1.html, lp2.html... If you plan to use the same domain to run offers in different country, you can create a bucket for each country and chose a data center in that country so the LP will load faster. usa.yourdomain.com = US data center uk.yourdomain.com = UK data center 1 elaine369 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites oceanguy99 0 Report post Posted 1 hour ago Hi all, I have had my ssl certificate sent to my email and approved it....however it doesn't autoprompt in the drop down menu on cloudfront distribution page...or let me input anything either. I have waited 2 hours....anyone else have this same problem?...It's critical because without this i can't receive the cloudfront domain to post in namecheap... Any help would be appreciated! John Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites adam83 11 Report post Posted 55 minutes ago 6 hours ago, pascalgi said: Only one bucket per domain and you just have to create folders for your different offers. If you want to split test different landing pages, you just need to add your html file in the same folder. The main file will be index.html and your other LP can be lp1.html, lp2.html... If you plan to use the same domain to run offers in different country, you can create a bucket for each country and chose a data center in that country so the LP will load faster. usa.yourdomain.com = US data center uk.yourdomain.com = UK data center @pascalgi Thank you so much 🙂 Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites adam83 11 Report post Posted 41 minutes ago 47 minutes ago, oceanguy99 said: Hi all, I have had my ssl certificate sent to my email and approved it....however it doesn't autoprompt in the drop down menu on cloudfront distribution page...or let me input anything either. I have waited 2 hours....anyone else have this same problem?...It's critical because without this i can't receive the cloudfront domain to post in namecheap... Any help would be appreciated! John Hi @oceanguy99 In my case, I waited for 25 minutes to get my SSL certificate activated. Once you activate your SSL certificate by clicking on the button, a message will appear with a link, when you click on that link a pop page will appear, in the bottom of the page (Right Side) you will see details about your SSL certificate and when it will be activated. You may need to delete the current bucket and re-create it to check. Cheers! Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites Reply to this topic... × Pasted as rich text. Paste as plain text instead Only 75 emoji are allowed. × Your link has been automatically embedded. Display as a link instead × Your previous content has been restored. Clear editor × You cannot paste images directly. Upload or insert images from URL. Loading... × Desktop Tablet Phone Notify me of replies Submit Reply Follow 1 Go To Topic Listing Next unread topic Unread Content Mark site read Home Technical Hosting How to Setup Amazon S3 + Cloudfront CDN × 0 0 Sign Out Mark site read Account Back Profile My Attachments Manage Followed Content Account Settings Ignored Users Browse Back Browse Forums Calendar Staff Online Users Leaderboard Activity Back Activity All Activity My Activity Streams Back Default Streams Unread Content Content I Started Content I Follow Members I Follow Content I Posted In Create New Stream Unread Content Content I Started Search × Create New... Topic Event Bagikan Artikel ini
Colin Dijs 75 Report post Posted February 26 When I set up Amazon S3 + Cloudfront I used this guide and it worked awesome. It's from nicklenihan.com The only step that didn't go well for me was the ssl on 6.7 but it didn't show to be a problem at all. 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. 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 Requirements: 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. Login to your Namecheap account. Find the domain you’d like to forward emails from. Click ‘Manage’. On the ‘Domain’ tab (should be the default tab after step 2), scroll down to the ‘Redirect Email’ section. 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 Go to the ACM Dashboard and click “Request a Certificate”. Enter your custom domain name and your domain name prepended with *., then click “Review and Request”.(i.e. *.example.comand example.com.) Check your email and click on the approval link. Then click “I Approve” on the approval screen you’ll be shown. If you return to the ACM Dashboard, you should see that your certificate has been issued. Step 3: Configure S3 Bucket for Static Site Go to the S3 Dashboard and click “Create Bucket”. Enter the name of the bucket. Use the domain name, but DO NOT use a . in the bucket name. Use a - instead. Click “Create”. See example below with example.com. Step 4: Fix Bucket Permissions Select the bucket you just created in the S3 dashboard. 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 Select the bucket in the S3 dashboard. Go to the “Properties” tab. 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 Go to the CloudFront Dashboard and click “Create Distribution”. Under the “Web” distribution method, click “Get Started”. 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. 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 Login to your Namecheap account. Find the domain you are going to use with CloudFront. Click ‘Manage’. Go to the “Advanced DNS” tab and find the “Host Records” section. Click “Add New Record”, select “CNAME”. In “Host” type @ and for the “Target” paste your CloudFront URL/Domain Name. 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. Go to the S3 dashboard. Upload your files. You can use folders to keep everything organized. 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 1 adam83 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
jrichardw 1 Report post Posted March 20 I'm assuming you ultimately got your SSL linked with your domain by now. For step 6.7 the SSL wasn't showing up for me because the domain was still pending verification--when I requested the cert. My DNS verification NEVER happened. After about an hour, I cancelled the DNS verification and went with email. All I had to do in Namecheap was setup a catch-all forwarding email to my gmail account, and I got the domain verification email. Then I went back through the cloudfront setup and my cert showed in the list because it had switched to the "issued" status. I would recommend this method to anyone, it was very easy to setup. These instructions are very close to the ones I used, but these are better. Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
pascalgi 3 Report post Posted March 20 I used Amazon S3 + Cloudflare instead of Cloudfront. Cloudflare has a free forever plan and seem to have more datacenter. Both are working but I like free stuff! 2 stephane and adam83 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
adam83 11 Report post Posted Sunday at 03:43 AM On 3/20/2020 at 3:13 AM, jrichardw said: I'm assuming you ultimately got your SSL linked with your domain by now. For step 6.7 the SSL wasn't showing up for me because the domain was still pending verification--when I requested the cert. My DNS verification NEVER happened. After about an hour, I cancelled the DNS verification and went with email. All I had to do in Namecheap was setup a catch-all forwarding email to my gmail account, and I got the domain verification email. Then I went back through the cloudfront setup and my cert showed in the list because it had switched to the "issued" status. I would recommend this method to anyone, it was very easy to setup. These instructions are very close to the ones I used, but these are better. Adding to that, it will take up to 25 mins to be activated (SSL) even if the status is "issued" 😉 Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
adam83 11 Report post Posted Sunday at 05:44 PM Hi Folks 🙂 I have a concern here. Do I need to create a new bucket every time I want to add a new landing page or I can upload multiple landing pages within the same bucket ? Thnx Adam Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
sandeepsar 1 Report post Posted Sunday at 08:42 PM 2 hours ago, adam83 said: Hi Folks 🙂 I have a concern here. Do I need to create a new bucket every time I want to add a new landing page or I can upload multiple landing pages within the same bucket ? Thnx Adam One bucket sufficient for per domain. You can make multiple folder in bucket and put your multiple landing page in those folders. 1 adam83 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
adam83 11 Report post Posted Sunday at 08:45 PM 2 minutes ago, sandeepsar said: One bucket sufficient for per domain. You can make multiple folder in bucket and put your multiple landing page in those folders. Thank you. Much appreciated. Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
pascalgi 3 Report post Posted 6 hours ago On 3/29/2020 at 4:44 AM, adam83 said: Hi Folks 🙂 I have a concern here. Do I need to create a new bucket every time I want to add a new landing page or I can upload multiple landing pages within the same bucket ? Thnx Adam Only one bucket per domain and you just have to create folders for your different offers. If you want to split test different landing pages, you just need to add your html file in the same folder. The main file will be index.html and your other LP can be lp1.html, lp2.html... If you plan to use the same domain to run offers in different country, you can create a bucket for each country and chose a data center in that country so the LP will load faster. usa.yourdomain.com = US data center uk.yourdomain.com = UK data center 1 elaine369 reacted to this Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
oceanguy99 0 Report post Posted 1 hour ago Hi all, I have had my ssl certificate sent to my email and approved it....however it doesn't autoprompt in the drop down menu on cloudfront distribution page...or let me input anything either. I have waited 2 hours....anyone else have this same problem?...It's critical because without this i can't receive the cloudfront domain to post in namecheap... Any help would be appreciated! John Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
adam83 11 Report post Posted 55 minutes ago 6 hours ago, pascalgi said: Only one bucket per domain and you just have to create folders for your different offers. If you want to split test different landing pages, you just need to add your html file in the same folder. The main file will be index.html and your other LP can be lp1.html, lp2.html... If you plan to use the same domain to run offers in different country, you can create a bucket for each country and chose a data center in that country so the LP will load faster. usa.yourdomain.com = US data center uk.yourdomain.com = UK data center @pascalgi Thank you so much 🙂 Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
adam83 11 Report post Posted 41 minutes ago 47 minutes ago, oceanguy99 said: Hi all, I have had my ssl certificate sent to my email and approved it....however it doesn't autoprompt in the drop down menu on cloudfront distribution page...or let me input anything either. I have waited 2 hours....anyone else have this same problem?...It's critical because without this i can't receive the cloudfront domain to post in namecheap... Any help would be appreciated! John Hi @oceanguy99 In my case, I waited for 25 minutes to get my SSL certificate activated. Once you activate your SSL certificate by clicking on the button, a message will appear with a link, when you click on that link a pop page will appear, in the bottom of the page (Right Side) you will see details about your SSL certificate and when it will be activated. You may need to delete the current bucket and re-create it to check. Cheers! Thanks Haha Confused Sad Like × Quote Share this post Link to post Share on other sites
Belum ada Komentar untuk "How to Setup Amazon S3 + Cloudfront CDN"
Posting Komentar