AWS Amplify with Google Domain DNS - amazon-web-services

I am a new Full Stack Dev and I am already stuck with hosting my portfolio on AWS Amplify and using a domain that is through Google Domains. I am aware that using AWS is quite a bit of overkill for a simple portfolio but I would like to get the experience with AWS and I enjoy the challenge.
I've already accessed my DNS tab in my Google Domains page. According to AWS we need to create our two CNAME records. One for the domain and one for the ACM validation certificate. I have also created a synthetic record for the forward because Google Domains does not support ANAME/ALIAS records.
I've confirmed that the data that I've entered into the CNAME records were correct and that I've allowed time for the records to update yet in my Amplify portal it still shows that I need to configure my CNAME records.
Are there any thoughts on whether this could be a hiccup on the Google or the AWS end? Should I just give in and transfer my DNS to Amazon Route 53? Any thoughts would be appreciated, thank you!

AWS' recommended steps work, up until the forwarding part: https://docs.aws.amazon.com/amplify/latest/userguide/to-add-a-custom-domain-managed-by-google-domains.html
To correctly setup forwarding, do the following:
You have registered the address: myaddress.com
Go to the 'Website' tab under domains.google.com/registrar/myaddress.com
Click 'Add a forwarding address'
Edit the 'Forward from' section. This defaults to two entries: 'myaddress.com' and 'www.myaddress.com'. Remove the one beginning with 'www', in the other use the prefix '#' like so:
Enter 'www.myaddress.com' into the 'Forward to' field
Click 'Forward'. This will add two records, which should now be visible in the 'DNS' tab.
Following these steps should mean you don't get asked to delete the CNAME record you made in the steps provided by AWS (that points at cloudfront).

I am doing exactly what you are doing - if you were looking at Actions > View DNS Records, in the "Update DNS records" box. You may have missed the alert box with a link to View Docs - where the procedure for google is, are you referring to the configuration that i think is needed for other providers?
Where does it say you need to configure CNAME records? Is your site live?

Related

Add separate subdomain routing for frontend and backend (Godaddy, AWS and Firebase)

We have an app whose domain is on Godaddy, the frontend (ReactJS) is hosted on Firebase and the backend (Django) is on AWS. We follow subdomain-naming just like Slack does i.e. xyz.ourdomain.com. However, for every customer we have to do these manual steps and wait for hours for records to propagate:
Add an A record to Godaddy where e.g. Name would be XYZ and Value would be the value provided to us by Firebase when we add a custom domain there which is Value: 151.101.1.195 (Firebase shows this message there: Your site will show a security certificate warning for a few hours, until the certificate has been provisioned.)
Then we need to authorize our domain URL xyz.ourdomain.com on Firebase and Google Cloud Console (however that is not a major worry for now)
The last step is some customisation from backend which is necessary and can be automated by me easily
I just want to know how to create wildcard entries so that when one enters *.ourdomain.com, it points to the Firebase hostings. Ideally, we want to remove the time it takes for records to propagate.
This level control is not built into firebase as it is designed to work as your primary domain app, as such you can redirect all subdomains in your DNS to point to your root domain with the following guide:
Log into your GoDaddy account.
Click “Domains.”
Click “Manage DNS.”
Click Add and select CNAME from the dropdown list.
Complete the fields listed:
Host: The host name should be set to the wildcard (" * ").
Points to: This is the URL you are setting as the destination for the host. ...
Click “Save.”
You additionally have the option for 301 permanent redirects.

AWS Route 53 redirection does not work as expected

We want to redirect our oldwebsite.com to newwebsite.com and both of the domains are managed in AWS Route53. The developer who set this up originally is not reachable.
I created an S3 bucket for oldwebsite.com and set it to redirect to newwebsite.com over http. Then on the Route53 hosted zone of oldwebsite.com, I chose the S3 bucket I created as an Alias name for the Type 'A' record set.
Our oldwebsite.com is down. I am pretty sure I have set the right values, but the oldwebsite.com still shows one of those "there is no website here, buy this website" type pages.
Further more, if I type www.oldwebsite.com, then that page opens, but if I type simply oldwebsite.com, it opens a 404 page not found on Hostgator.
Any help on where to check would be appreciated.

What's the best way to set up redirection on domain to an specific page

I have example-bulkorder.com domain which is connected to ecommerce hosting (Business Catalyst).
This site doesn't need ecommerce anymore so I create a simple page on example.com/bulkorder which has a form that send email to me so that I can handle bulk orders manually via email.
At the moment I just set up redirection with javascript but when I unsubscribe Business Catalyst hosting, I will need to find a way to set up this redirection from example-bulkorder.com domain to example.com/bulkorder
Is there a way to do this with AWS or should I just kill the old domain?
I am not worried about all pages under the domain but at least the main url to be redirected.
Or should I just let the old domain goes to broken link and let people to find out that the url is not available? What's the best solution? I want to keep the old domain in case I need it with separate ecommerce system in the future.
Use the following procedure to redirect your domain
Requirements
A hosted zone for the domain example-bulkorder.com is hosted in Amazon Route 53.
You have permissions to add resource records to the hosted zone of example.com.
You have permissions to create an Amazon S3 bucket.
You are able to create an S3 bucket with the exact name for example.com.
Note: The sites must be HTTP because the redirect cannot connect to S3 over HTTPS.
In the Amazon S3 console, create an S3 bucket with the exact name as example-bulkorder.com.
Note: S3 bucket names must be globally unique. If the bucket name you need is already in use, this solution cannot be used.
Select the bucket you just created, and then choose Properties. Expand the Static Website Hosting drop-down menu, and then choose Redirect all requests to another hostname.
In the Redirect, all requests to another hostname field, enter example.com/bulkorder and then choose Save.
In the Route 53 console, select the hosted zone named example-bulkorder.com.
Create a resource record for example.com with the following values:
Record Type: Choose A IPv4 address.
Alias: Choose Yes.
Alias Target: Select the blank value field, expand the drop-down menu, and then choose your S3 bucket under the heading S3 Website Endpoints.
Routing Policy: Choose Simple.
Evaluate Health Target: Choose No and then choose to Create.
Note: The drop-down menu might take a few moments to populate your bucket name.
You should now be able to redirect example-bulkorder.com to example.com/bulkorder.
You could do this serverless by using Cloudflare (probably the easiest way), just need to create a page rule to redirect your domain to your desired endpoint.
Check this post: How do I perform URL forwarding or redirects with Cloudflare?
Within AWS is also possible you have more options, one of this is using an S3 bucket, check this article: https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53/

AWS Custom Domain Name for Lambdas

I'm working with AWS Lambdas and I deploy them using Serverless. Everytime I deploy any function I receive this kind of URL to hit the service:
https://mh6r122dq1.execute-api.us-east-1.amazonaws.com/{stage}/{function}
where 'stage' is either dev or qa, and 'function' is the name of my lambda function.
I'm trying to access to my lambdas using a more friendly URL. I followed this tutorial from AWS docs:
http://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html
I can not make it work. I have already the certificates created, my company did it. So to me, this just needs to be as simple as select the name of your domain and attach it to your Lambda API gateway.
These are the steps I'm doing:
1) I create a Custom Domain Name here https://console.aws.amazon.com/apigateway/home?region=us-east-1#/custom-domain-names. The page offers me automatically the certificate. I'm using some made up name like my.service.com. I also tried using a fully qualified domain name from my company which is hosted in our AWS account. None of both worked.
2) Then from the same page I select the base path, the destination (which is my lambda) and the stage. After saving it, the page provides me with a value called 'Distribution Domain Name', it looks like abc123def456.cloudfront.com.
3) Then I go to Amazon 53 and I create a new Hosted Zone. Again, I'm sure here if I need something totally made up or a real domain. Then I create a new A record for a ip address, I mark Alias-true, and I put the value from above "Distribution Domain Name"
And that's it. Those are the steps I'm doing. Then when I tried to hit my Lambda, I followed the instructions from the page I put above in the section "Root URLs of APIs with default and custom domain names".
I followed this process a couple of times and I'm really wondering if that page is ok. When I hit my lambdas with the custom domain name I get a 404 or a "can not resolve this host".
Does anyone have followed that process from that page from AWS and had good results?
UPDATE Thu Jul 13 12:23
Here are some pictures of my settings:
I get "Could not resolve host" either for qa-lambda.lqwebservices.com
or rateloader.qa.lqwebservices.com
"Again, I'm sure here if I need something totally made up or a real domain" you need a real domain name. Also since you needed to create a new hosted zone, that means your company does not currently use AWS Route 53 for their DNS. You'll have to point something like api.company.com to abc123def456.cloudfront.com from whatever domain registrar your company uses.

Can we verify (or have ) same domain in Amazon SES from different AWS account?

I have two different AWS account and only one domain server like example.com
Now, I cannot share smtp keys with different account, so how can I configure SES with same domain.
To answer your main question.
Yes you can use the verify the same domain (example.com) from multiple AWS Accounts. (If you have your DNS hosted in R53 then its even easier)
See the following excerpt from Amazon Docs
You want to verify the same domain multiple times and you can't have multiple TXT records with the same name—You might need to verify
your domain more than once because you're sending in different regions
or you're sending from multiple AWS accounts from the same domain in
the same region. If your DNS provider does not allow you to have
multiple TXT records with the same name, there are two workarounds.
The first workaround, if your DNS provider allows it, is to assign
multiple values to the TXT record. For example, if your DNS is managed
by Amazon Route 53, you can set up multiple values for the same TXT
record as follows:
In the Amazon Route 53 console, choose the
_amazonses TXT record you added when you verified your domain in the first region.
In the Value box, press Enter after the first value.
Add the value for the additional region, and save the record set.
The
other workaround is that if you only need to verify your domain twice,
you can verify it once with _amazonses in the TXT record name and the
other time you can omit _amazonses from the record name entirely. We
recommend the previous solution as a best practice, however.
Reference: http://docs.aws.amazon.com/ses/latest/DeveloperGuide/domain-verification-problems.html#domain-verification-common-problems
Also for best practice refer the below Doc
https://aws.amazon.com/blogs/ses/can-i-use-multiple-aws-accounts-with-ses/