Skip to main content

Posts

How can I copy S3 objects from another AWS account?

Step 1: Get the 12 digit number of the Destination AWS AccountSign in to the AWS Management Console for the destination AWS account.In the navigation bar, click Support, and then click Support Center. The account number (for example, 222222222222) is displayed in the upper-right corner of the Support Center.
Step 2: Attach the policy to Source S3 Bucket The Bucket policy set up in the source AWS account. Do NOT forget to change the account number and bucket name in the below policy, otherwise, it will not work For help on setting the ACL check here{ "Version": "2012-10-17", "Statement": [ { "Sid": "DelegateS3Access", "Effect": "Allow", "Principal": {"AWS": "057682336657"}, "Action": ["s3:ListBucket","s3:GetObject"], "Resource": [ "arn:aws:s3:::cdn.exam…
Recent posts

Changing the Time Zone on Amazon Linux Ec2 Instance

Amazon Linux instances are set to the UTC (Coordinated Universal Time) time zone by default, but you may wish to change the time on an instance to the local time or to another time zone in your network. Important These procedures are intended for use with Amazon Linux. For more information about other distributions, see their specific documentation. To change the time zone on an instance Identify the time zone to use on the instance. The /usr/share/zoneinfo directory contains a hierarchy of time zone data files. Browse the directory structure at that location to find a file for your time zone.

How we can redirect non-www traffic to www domain from Route 53?

We can simply done this by the help of an s3 bucket. You must have privilege to create s3 bucket and Route 53 edit access. Here I am explaining the steps with some screensshots. Please see the steps pasted below: Step 1. Create an s3 bucket. This is the first step. You need to create an s3 bucket with the domain name which you want to redirect to www. To create s3 bucket, log onto AWS console, services -> Amazon S3 -> Create bucket -> Create a bucket with non www domain name or vice version if we want to redirect from www to non www.

Step 2. Make the bucket as a Static website hosting with redirect. For this, go to bucket properties, choose Static website hosting with redirect requests. Add the www redirect there and save it. That’s it. If we want to redirect from www to non www then we have to enter target domain as 
Step 3. Edit AWS Route 53 entry for non www domain. Go to AWS Route 53, select hosted domain, select the zone entry. From the right side, chose the setting as: A –…

how to install ssl certificate on tomcat at aws ec2 instance

Stpes to Install SSL Certificate at tomcat in aws ec2 instance

1) Generate CSR
2) Purchase Your SSL Certificate
3) Activate your SSL Certificate.
    1) Download Certificate File
    2) Convert into required formate
4)    Create Elastic Load Balancer.


1) Generate CSR

Before we go ahead we should have aws account and we have a ready tomcat in ec2 instance should should is running inside it.

Connect your EC2 instnace through putty or terminal in mac.

by entering following command in terminal (MacOs)


Last login: Wed Apr3 08:14:13 on console Mukeshs-MacBook-Air:~ mukeshchoudhary$ sudo ssh -i Desktop/AWS-2019/touristvisaonine2019.pem ec2-user@ec2-13-234-72-211.ap-south-1.compute.amazonaws.com Password: Last login: Sat Mar 30 12:44:15 2019 from 223.190.91.168
__|__|_) _|( / Amazon Linux AMI ___|\___|___|
https://aws.amazon.com/amazon-linux-ami/2018.03-release-notes/ 13 package(s) needed for security, out of 20 available Run "sudo yum update" to apply all updates. -bash: warning: setlocale: …