Skip to content

Instantly share code, notes, and snippets.

@j-un
j-un / migrate-r53-hosted-zone.sh
Created December 14, 2020 07:48
Create resource record sets for migrating a hosted zone to a different AWS account.
#!/bin/bash
# Create resource record sets for migrating a hosted zone to a different AWS account.
# Ref: https://docs.aws.amazon.com/en_us/Route53/latest/DeveloperGuide/hosted-zones-migrating.html
#
# Usage: aws route53 list-resource-record-sets --hosted-zone-id XXXXXXXXXXXXXX | bash migrate-r53-hosted-zone.sh
#
if [ -z $(command -v jq) ] ;then
echo "command not found: jq"
exit 1
@j-un
j-un / spotify.html
Last active February 5, 2024 16:51
[Hugo] Shortcode for Spotify embed code
<!--
Parameters:
type - (Required) album / track / playlist / artist
id - (Required) Target ID
width - (Optional) width
height - (Optional) height
-->
{{ if .IsNamedParams }}
<iframe src="https://open.spotify.com/embed/{{ .Get "type" }}/{{ .Get "id" }}"
@j-un
j-un / cloudfront-s3-static-website-hosting.cfn.yml
Created November 15, 2018 20:11
CloudFormation template snippet - CloudFront Distribution with a S3 Static Website Hosting
AWSTemplateFormatVersion: 2010-09-09
Description: CloudFront Distribution with a S3 Static Website Hosting
Parameters:
CustomDomain:
Type: String
Description: Domain name of your website.
CertificateARN:
Type: String
Description: SSL Certificate ARN. SSL Certificate must be in us-east-1 region.
Resources:
@j-un
j-un / cloudfront-s3-using-OAI.cfn.yml
Created November 15, 2018 20:07
CloudFormation template snippet - CloudFront Distribution with a S3 Origin
AWSTemplateFormatVersion: 2010-09-09
Description: CloudFront Distribution with a S3 Origin (ristrict direct access to S3 using OAI)
Parameters:
CustomDomain:
Type: String
Description: Domain name of your website.
CertificateARN:
Type: String
Description: SSL Certificate ARN. SSL Certificate must be in us-east-1 region.
Resources: