s3_website
TRANSCRIPT
![Page 1: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/1.jpg)
s3_websiteHamamatsu.rb #69
1 — Hamamatsu.rb #69
![Page 2: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/2.jpg)
s3_websitethe easiest way to publish static
html on AWS2 — Hamamatsu.rb #69
![Page 3: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/3.jpg)
Amazon S3· cloud storage
· 99.999999999% durability· 99.99% availability
· charging by hour· Ex. ($0.0330/GB + request charge)/month
3 — Hamamatsu.rb #69
![Page 4: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/4.jpg)
static site hostingcan publish only uploading html to S3.
4 — Hamamatsu.rb #69
![Page 5: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/5.jpg)
s3_website· s3_website is rubygems
· repository https://github.com/laurilehmijoki/s3_website
· Jekyll· Amazon CloudFront
5 — Hamamatsu.rb #69
![Page 6: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/6.jpg)
install s3_websitemkdir my_website && cd my_websitebundle initecho 'gem "s3_website"' >> Gemfilebundle install --path .bundle
6 — Hamamatsu.rb #69
![Page 7: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/7.jpg)
setup websitebundle exec s3_website cfg create
7 — Hamamatsu.rb #69
![Page 8: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/8.jpg)
s3_website.yml# aws access key & secrets3_id: <%= ENV["AWS_ACCESS_KEY"] %>s3_secret: <%= ENV["AWS_ACCESS_SECRET"] %>s3_bucket: my-awesome-website
# html dirnamesite: html
# aws regions3_endpoint: ap-northeast-1
8 — Hamamatsu.rb #69
![Page 9: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/9.jpg)
generate AmazonS3 bucket.bundle exec s3_website cfg apply
Applying the configurations in s3_website.yml on the AWS services ...Created bucket my-awesome-website in the us-east-1 RegionBucket my-awesome-website now functions as a websiteNo redirects to configure for my-awesome-website bucketBucket my-awesome-website is now readable to the whole worldDo you want to deliver your website via CloudFront, Amazon’s CDN service? [y/N] N
9 — Hamamatsu.rb #69
![Page 10: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/10.jpg)
publish html files.bundle exec s3_website push
[info] Successfully pushed the website tohttp://my-awesome-website.s3-website-ap-northeast-1.amazonaws.com
10 — Hamamatsu.rb #69
![Page 11: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/11.jpg)
generated files.$ tree.|-- Gemfile|-- Gemfile.lock|-- html| `-- index.html`-- s3_website.yml
1 directory, 4 files
11 — Hamamatsu.rb #69
![Page 12: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/12.jpg)
* notice *· Need to delete bucket manually.
· Bucket name is unique in all of the world.
12 — Hamamatsu.rb #69
![Page 13: s3_website](https://reader031.vdocuments.mx/reader031/viewer/2022030210/58a49c981a28ab741b8b6763/html5/thumbnails/13.jpg)
that's all.Simple & Easy
13 — Hamamatsu.rb #69