4

I am able to set up AWS WorkMail to receive and send email using custom domain e.g. john@mycompany.com

Now I'd like to allow our users to login and access emails at https://mail.mycompany.com (instead of the AWS provided access url https://mycompany.awsapps.com).

The document I can find seems only handle my first case (which is already done).

Thanks

Guido Leenders
  • 4,232
  • 1
  • 23
  • 43
webp
  • 1,311
  • 2
  • 13
  • 16

4 Answers4

7

I would create a static s3 page with a basic html redirect if you already have the domain name in route 53. That way it is free.

  1. Create a new s3bucket, mywebmail.mydomain.com
  2. in the s3 bucket properties turn on static domain hosting
  3. create an index.html page with the following code:
<html>
 <head>
 <meta http-equiv="refresh" content="0; URL='https://mydomain.com.awsapps.com/mail'" />
 </head>
</html>
  1. go to route53 and create a new record set. Select alias and find your s3 bucket created in step 1.

S3 Static websites are pretty powerful stuff. I love them!

tedder42
  • 23,519
  • 13
  • 86
  • 102
5

I resolved this by using the built-in CloudFront interface.

I admit the documentation on this is pretty poor, but the aim behind it is to get people to pay for this redirection.

To have your mywebmail.mydomain.com mapped into myaws.awsapps.com/workmail then please follow the steps below:

1) You might have done this step already: On your DNS server (where that is), create a CNAME to map mywebmail.mydomain.com into myaws.awsapps.com

2) Login into your CloudFront interface https://console.aws.amazon.com/cloudfront/

3) Click on "Create Distribution"

4) On the Origin-Domain put myaws.awsapps.com

5) On the Origin-URI put /workmail

6) Adjust the setting to what you like such as redirecting from HTTP into HTTPS or use as-is etc.

7) Scroll down to the CNAME and enter the aliases you need, for this example you need to put in mywebmail.mydomain.com

8) Save

9) Notice that this might take a while to get created, mine took about 30 minutes to complete, also every time I needed to edit something it would take around 10-20 minutes to complete.

10) Once done, browse your mywebmail.mydomain.com, your CNAME on your original DNS (step 1 above) should ask your browser to redirect and then with AWS CloundFront setting it would add the URI afterwards,

11) If you get a blank page, then check your headers, in particular ( ?organization=YourDomainName ), you might need to manually add it there from the behaviours menu of the item you created above.

Urda
  • 5,460
  • 5
  • 34
  • 47
Heider Sati
  • 2,476
  • 26
  • 28
  • In step one I create a CNAME from mywebmail.mydomain.com to myaws.awsapps.com/workmail . However setting up the cloudfront distribution with origin myaws.awsapps.com and CNAME mywebmail.mydomain.com is doing te same thing isn't it? – xtra Oct 02 '20 at 16:05
  • @xtra How is it possible to create a CNAME record that points to a subdirectory? You'd have to add `/workmail` after your custom domain, however, with CloudFront distribution, you don't have to do that. – Aniruddh Nov 10 '20 at 05:09
1

Create a sub-domain "mail.mycompany.com" and redirect it to "mycompany.awsapps.com".

1

You can now set S3 to redirect without hosting anything in it.

  1. Create a bucket mail.yourdomain.com
  2. Under properties enable Static website hosting setting is at the bottom of the page
  3. Under hosting Redirect requests for an object set hostname to yourcompanyname.awsapps.com/mail screenshot of setting
  4. under Route53 create an alias A record that points to the S3 bucket
medic17
  • 415
  • 5
  • 16