h1. Using Amazon Web Services


would this be a possible replacement for MailGun to send the login link for my no-password login functions?

Amazon SES - Bulk and transactional email-sending service.
http://stackshare.io/amazon-ses

q.
Amazon SES eliminates the complexity and expense of building an in-house email solution or licensing, installing, and operating a third-party email service. The service integrates with other AWS services, making it easy to send emails from applications being hosted on services such as Amazon EC2.
q..



hr.


good post to read:

https://www.davidbaumgold.com/tutorials/host-static-site-aws-s3-cloudfront/

---



Logged into aws.amazon.com with my Amazon account, which I then used to create an AWS account.

Created an EC2 instance. I choose Ubuntu 14.04.

Instance is running in the US East (N. Virginia) region.


During the process, I had to create a key pair name. AWS created a private key, which I downloaded. It was a .pem file.

I moved the .pem file to another directory on my local Linux machine at home. From within this directory, I used ssh to connect to my EC2 account, using the command line instructions provided by AWS's web interface.

It's a fairly clean or empty Linux machine, as with my Digital Ocean Droplet account.

I chose to install Nginx first.

http://jothut.com/cgi-bin/junco.pl/blogpost/21154/14May2015/Installing-nodejs-nginx-mysql-junco-and-ghost-on-Digital-Ocean-Droplet#Installing-Nginx

http://jothut.com/cgi-bin/junco.pl/blogpost/71676/05Jul2016/Installing-thttpd-and-tor-to-create-a-onion-website

http://voidcanvas.com/setup-and-configure-nginx-in-aws-ec2-linuxubuntu-instance/

this starts in the home directory, which is /home/ubuntu 

* sudo apt-get update
* sudo apt-get install nginx
* sudo service nginx start
* sudo mkdir www
* cd www
* sudo mkdir mysite
* cd mysite
* sudo vim index.html
** added test content to index.html
* cd 
* sudo chmod -R 755 www
* cd /etc/nginx/sites-available
* ls
* sudo cp default mysite
* cd ..
* cd sites-enabled
* sudo ln -s /etc/nginx/sites-available/mysite mysite
* sudo service nginx restart

ec2-54-211-235-101.compute-1.amazonaws.com





h2. Route53

bought: perchwire.com and boghop.com through AWS.

used route53's dns setup to connect the ec2 instance with the domain name.





h2. AWS Info

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html?icmpid=docs_ec2_console


https://aws.amazon.com/start-now/

https://aws.amazon.com/documentation/gettingstarted/?sc_channel=em&sc_campaign=wlcm&sc_publisher=aws&sc_medium=em_wlcm_2&sc_detail=wlcm_2&sc_content=other&sc_country=global&sc_geo=global&sc_category=mult&ref_=pe_1679150_132208650

http://docs.aws.amazon.com/gettingstarted/latest/swh/website-hosting-intro.html

https://aws.amazon.com/route53/


https://forums.aws.amazon.com/thread.jspa?threadID=87279




h2. web access problem resolved

wed, evening, july 27, 2016. i have not looked at this since last week when i initiated this.

http://boghop.com now works, display a hello world type message.


https://forums.aws.amazon.com/message.jspa?messageID=571142

my issue was identical

q.
I have taken a look at your one running instance and I can see you have only allowed access to port 22 in the associated Security Group ("sg-0bbd436e").

In order to ping the instance, you will need to allow ICMP traffic. In order to browse to the instance, you will need to typically open port 80/443--this depends on which port you have configured the Web server to listen.
q..

in EC2 management:

- showed instances running, which is only one
- scroll to the right, all the way, to show security groups
- click the link for launch-wizard-1
- only thing permitted was port 22 for ssh
- i added http port 80
- i also added icmp


next, i need to install:

* perl
* fast cgi
* wren
** any modules used by wren
*** mailgun
*** json



hr.

https://aws.amazon.com/blogs/aws/


https://hackernoon.com/how-a-book-store-is-dominating-the-cloud-4ef3a839aaba#.sz2fcsl9w
Certificate Manager ( #ssl )

and CloudFront

https://docs.aws.amazon.com/acm/latest/userguide/acm-overview.html

https://docs.aws.amazon.com/acm/latest/userguide/gs-cf.html

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/SecureConnections.html

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/HowCloudFrontWorks.html

https://console.aws.amazon.com/cloudfront/home?region=us-east-1#

https://aws.amazon.com/cloudfront/pricing/

http://www.slideshare.net/AmazonWebServices/whole-site-delivery-with-amazon-cloudfront

http://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/what-is-load-balancing.html


load balancing info:
https://aws.amazon.com/articles/1636185810492479



https://docs.aws.amazon.com/acm/latest/userguide/acm-services.html


request a certificate:
https://console.aws.amazon.com/acm/home?region=us-east-1#/wizard/?firstrun=true


load balancer
https://docs.aws.amazon.com/acm/latest/userguide/gs-elb.html


cloudfront and s3
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/MigrateS3ToCloudFront.html


etc.
https://wblinks.com/notes/aws-tips-i-wish-id-known-before-i-started/
https://news.ycombinator.com/item?id=7172060


load balancing doc
https://aws.amazon.com/articles/1636185810492479





http://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html



python and aws:
https://aws.amazon.com/sdk-for-python/

https://aws.amazon.com/tools/



https://aws.amazon.com/cli/


Speeding up delivery of web content using Amazon Route 53, Elastic Load Balancer and CloudFront
http://www.slideshare.net/tomlaszewski/web-sitescalingpartnerwebinar



https://aws.amazon.com/cloudfront/


moving files to s3
https://news.ycombinator.com/item?id=7172583



https://www.davidbaumgold.com/tutorials/host-static-site-aws-s3-cloudfront


s3
http://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html


http://jothut.com/cgi-bin/junco.pl/replies/77700

https://news.ycombinator.com/item?id=12528070

"You can invalidate cache with fake (ignored) URL parameters (http://foo.html?hello) or HEAD section declarations." 


+1 on setting up an s3 bucket, cloudfront distribution, ssl sni, route 53 rules and simple "aws s3 sync" command with some cache-headers

GitHub (source) => TravisCI (deployment) => S3 (hosting).
I have a CloudFront distribution sitting in front of S3, secured with a free SSL certificate powered by Amazon ACM. I like S3 for its flexibility. My site is in both English and Dutch and I want to serve English content on .io and the Dutch content on .nl. With S3 I just create two buckets, associate the bucket with a different domain and welcome page (index_en.html and index_nl.html) and publish the same site to each bucket.

Amazon S3 + CloudFront here, for several websites and it works wonderfully. I recently set up attensee/s3_website as a pipeline on my BitBucket repo, so now when any team member pushes their HTML/CSS updates to BitBucket, it automatically deploys the site to S3 and invalidates the CloudFront caches automatically. Instant website updates using only `git push`.


http://stout.is/
Stout is a deploy tool for static websites. It takes a website and uploads it to S3 in a more reliable way than other tools.




https://tech.flyclops.com/posts/2016-04-27-flyclops-sites-static-ssl.html

https://www.smashingmagazine.com/2015/11/modern-static-website-generators-next-big-thing/




AWS Webcast - Best Practices for Content Delivery using Amazon CloudFront
https://www.youtube.com/watch?v=s9Xt1qzD6SA

Amazon CloudFront to improve delivery of static or dynamic content originating from AWS services such as Amazon S3, Elastic Load Balancing (ELB), or Amazon EC2. 

Learning Objectives: 
• Best practices for delivering your whole website on Amazon CloudFront 
• Best practices to deliver content securely via Amazon CloudFront 
• Best practices to deliver content from AWS services such as Amazon S3, Amazon EC2 and Elastic Load Balancing using Amazon CloudFront 

Who Should Attend: 
• All AWS (S3, EC2, or ELB) customers who have some data transfer to internet 
• All Amazon CloudFront customers





https://www.elegantthemes.com/blog/tips-tricks/how-to-use-amazon-s3-and-cloudfront-with-wordpress



ec2 and cloudfront
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CustomOriginBestPractices.html



https://aws.amazon.com/cloudfront/webinars/



https://aws.amazon.com/cloudfront/dynamic-content/

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html


hr.


* http://www.slideshare.net/AmazonWebServices/whole-site-delivery-with-amazon-cloudfront
* http://www.slideshare.net/tomlaszewski/web-sitescalingpartnerwebinar
* https://aws.amazon.com/cloudfront/
* http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/MigrateS3ToCloudFront.html
* https://www.davidbaumgold.com/tutorials/host-static-site-aws-s3-cloudfront/
* https://aws.amazon.com/cloudfront/faqs/
* https://www.youtube.com/watch?v=s9Xt1qzD6SA
* https://aws.amazon.com/cloudfront/dynamic-content/
* http://docs.aws.amazon.com/AmazonS3/latest/dev/request-rate-perf-considerations.html
* https://aws.amazon.com/cloudfront/webinars/



previous route 53 dns settings:

name = www
type = CNAME
ttl = 300
value = boghop.com.


name=boghop.com.
type = A
ttl = 300
value = 54.211.235.101

d2sozmwf59ohoz.cloudfront.net



http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-cloudfront-distribution.html


http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html


https://news.ycombinator.com/item?id=12401849


http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html




http://stackoverflow.com/questions/22021651/amazon-s3-and-cloudfront-cache-how-to-clear-cache-or-synchronize-their-cache



http://www.cdnplanet.com/tools/cloudfront-purge-tool/

http://www.technowise.in/2012/09/clear-cache-from-amazon-cloudfront-aws.html


http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/GetInvalidation.html


https://www.quora.com/How-do-I-flush-a-Amazon-cloudfront-cache


http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html#invalidating-objects-api

http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/Welcome.html


https://aws.amazon.com/developertools/0756890389303912


http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/CreateInvalidation.html

https://aws.amazon.com/code/3143226315989801



[x] https://aws.amazon.com/developertools/0756890389303912

[x] http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/RESTRequests.html


view CloudFront's REST API

* http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/Welcome.html
* http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/RESTRequests.html


http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior



h3. S3

on fri, oct 7, 2016, i created an s3 bucket named boghop.

boghop.s3-website-us-east-1.amazonaws.com


http://s3tools.org/s3cmd


http://jothut.com/cgi-bin/junco.pl/blogpost/78395/02Oct2016/More-static-site-and-aws-links


http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash


??? https://docs.aws.amazon.com/AmazonS3/latest/dev/website-hosting-custom-domain-walkthrough.html

http://docs.aws.amazon.com/AmazonS3/latest/UG/EditingBucketPermissions.html