amazon-web-services


How to redirect traffic using only AWS services?


I have a static website hosted in a AWS s3 bucket "domain1.com", a cloudfront distribution in front of it redirecting all http traffic to https and a Route53 record for routing traffic to the cloudfront distribution. This is currently working but I can't seem to get the following to work:
Redirect all of the following to https://domain1.com
http://www.domain1.com
https://www.domain1.com
http://domain2.com
https://domain2.com
http://www.domain2.com
https://www.domain2.com
Does anyone has any pointers? I tried redirecting with s3+route53 but it only worked with http://domain2.com while https://domain2.com was not redirected...
A quick and dirty way is to use S3 and Route 53.
Lets call the bucket "bucket-domain1-com"
http://www.domain1.com -> point to actual site (use mod_rewrite to change to https)
https://www.domain1.com -> point to actual site
http://domain2.com -> point to cloudfront distro -> s3 "bucket-domain1-com"
https://domain2.com -> point to cloudfront distro -> s3 "bucket-domain1-com"
http://www.domain2.com -> point to cloudfront distro -> s3 "bucket-domain1-com"
https://www.domain2.com -> point to cloudfront distro -> s3 "bucket-domain1-com"
Problem with S3 is that you cannot use https.
CloudFront solves this.
Then follow the instructions here to configure s3 to redirect to https://domain1.com
This is the basic idea.

Related Links

JMeter GUI in Amazon EC2 instance
Cannot create a new user in Amazon Redshift using SQL Workbench/J
the data sent to users from servers,is it data out form s3 or data out from ec2 ?refering to AWS
How to connect AWS EC2 private IP with filezilla
StatusMessage ClientError: Error reading registry file SOFTWARE
Amazon MWS for third-party app
Boto3 error: The AWS Access Key Id you provided does not exist in our records
Want to pass header value of a WebRequest to SQS (either as token value or in attribute) from API Gateway
Changing domain DNS from godaddy to amazon Route 53 not working
CodePipeline unable to locate SAM template yaml file
Does the SES email quota apply to verification mail by Amazon Cognito?
AWS Sending Notifications to a Lambda function in other account
AWS Lambda and Multipart Upload to/from S3
Using AWS Simple Directory for on-premise clients
Data Modeling with Amazon Cognito and DynamoDB
How to test API Gateway methods with custom authorizer and empty $context.authorizer.* variables?

Categories

HOME
qt
cocoapods
visual-studio
macos-sierra
lambda
tomcat
shinyapps
yahoo-weather-api
activemq
histogram
cryptography
mirc
cypher
qooxdoo
google-search-console
ag-grid
cocotb
log4j2
scrape
lapack
spring-amqp
orange-api
pywinauto
google-tasks-api
exe
cloudsim
nullreferenceexception
tableview
sqlplus
cell
unordered-multimap
strophe.js
webviewclient
clipboard
bonita
splunk-query
tightvnc
memory-fences
knights-tour
private-key
gsp
creation
db2-luw
amazon-kms
formsauthenticationticket
nanogallery
uivisualeffectview
microkernel
grails-spring-security
classnotfoundexception
hdiv
hypothesis-test
dagger
latexml
oracle-bmcs
moinmoin
doctrine-extensions
ol3-google-maps
watir-webdriver
emacs25
dynamics-crm-4
degrees
oid
bigdecimal
jpda
visual-studio-monaco
deferred-rendering
gnucash
fdt
helm
self
libz
replicaset
phpredis
deque
fuseesb
shell-extensions
dos2unix
neo4jphp
tabletools
wso2bam
radius-protocol
accountmanager
visual-c++-2005
lru
objective-c-runtime
pacman
insertion
donut-chart
popup-blocker
zotonic
algol68
mkannotation
sigar
mmc3
litespeed
suphp
cleartype
aspbutton
facebook-fbml
main-method
jboss-mdb

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App