How to make AWS CLI call from local machine using federated login
This article explains the steps required to make AWS CLI call from local machine using federated login. Steps described …
In this article we will see the steps to connect your custom google domain with AWS Route 53. This article was written using google domain as an example but the approach is the same for connecting any other domain registrar like GoDaddy, Namecheap etc with AWS Route 53.
Hosted zones
– > Click Create Hosted Zone
Domain Name
and select Type
as Public Hosted Zone
and click createMy domains
DNS
Name servers
, Select Use custom name servers
Changes to example.com saved. They'll take effect within the next 48 hours.
So for now lets assume, I do not have a web page to which my domain should forward requests. I am going to forward all my request to google.com
Create a s3 bucket with the name as your domain name, say example.com
Go to Permissions and turn off Block all public access
Click on Bucket Policy
and set read only access
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::example.com/*"
}
]
}
Go to S3 bucket properties and enable Static website hosting
, Here we will select redirect requests and type www.google.com
in target bucket or domain
Copy the endpoint from static web hosting and use it to create a new CloudFront distribution. Remember here “Origin Domain Name” should the endpoint from static web hosting of s3 and not the s3 bucket itself
After you have the CloudFront distribution, Copy the Domain Name from CloudFront distribution
Go to Route 53
–> Click Hosted zones
–> Click the Hosted zone
which we created in step 1
Add a record set for the naked domain name say example.com
Name | example.com |
Type | A |
Alias | Yes |
Alias Target | Domain Name from CloudFront distribution |
Add a record set for the www domain name say example.com
Name | www.example.com |
Type | A |
Alias | Yes |
Alias Target | Domain Name from CloudFront distribution |
DNS changes will take anywhere between couple of hours to 24 hours, After that if you try to access your domain you will be redirected to google.com.
Use dig command to verify dig example.com +nostats +nocomments +nocmd
This article explains the steps required to make AWS CLI call from local machine using federated login. Steps described …
Flatten JSON is an simple REST API which takes a JSON object as input and parses into a key/value string. Here the key …