How we began
You have to follow some steps if you want to upload images
on S3 bucket. All steps are given below. I
will also give a detail description about these points which surely
helps you to upload images on s3 bucket.
1.
Create your AWS account.
2.
Log in
3.
Create an IAM user.
4.
Create a bucket and etc
How to create an IAM user:
- . Search for an IAM user and open it.
2. Click on users.
3. Now you have to click on Add User.
4. Give user name and give programmatic access to
user and click on next.
5.
Give access to users. I give only two excess to
user.
1.
AmazonS3FullAccess
2.
Amazonec2FullAccess
6. Click next and then create user. When we click
on create user then it will give secret key and access key of user. Through
these keys we will access our bucket. Download these credentials by clicking of download.csv.
How to create an S3 Bucket:
- Search for S3 bucket and then click it.
- Now you have to give a unique name to bucket and select a region.
- Click on next button and then enter key and value and then click on next.
- Go to CloudFront Distributions and click on create distributions.
In this you have to click on Request or Import a
Certificate with ACM:-
Then by default it will generate certificate in N. virginea
Region don’t change it. Create it and then set record set in Route 53.
- Wait for few minutes until status becomes deployed and then copy domain name and save it.
- Click on hosted zones.
- Click on create record set and then enter name and value. Here we enter that value which we copied in cloud front(domain name) and then click on create button.
How to add bucket policy:
- After clicking on generate policy it will give
some content copy it.
- Download aws java sdk and copy all jar files
inside it and add these jar files into our project.
- Make properties file. Name s3.properties.And put your access key and secret key here.
- Make jsp page index.jsp and output.jsp.
- Inside web.xml file.
- Create a package controllers inside source package and inside that package make a servlet name ImageUploadController.java.
- Create one utility java class .
It' actually a great and helpful piece of information. I am glad that you shared this helpful information with us. Please stay us up to date like this. Thank you for sharing. wonderful blog has been shared by you keep posting more like this apply here .
ReplyDelete