SlideShare a Scribd company logo
1 of 15
Mount AWS S3 Bucket to EC2 with IAM
Role
- Ishant Kumar
“Mount AWS S3 Bucket to EC2 with IAM Role”
Amazon Simple Storage Service (Amazon S3), provides developers and
IT teams with secure, durable, highly-scalable object storage. Amazon
S3 is easy to use, with a simple web services interface to store and
retrieve any amount of data from anywhere on the web.
Source : http://aws.amazon.com/s3/
 For object storage , we can mount S3 bucket to a particular
directory in AWS EC2.
Here are the steps :
Step 1 : Create one IAM Role with policy having appropriate access to
a particular bucket.
For Example : IAM Role name is EC2RoleForS3Access.
Policy attached (having Read/Write Access for bucket “s3bucket-for-
ec2″ ) :
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": ["arn:aws:s3:::s3bucket-for-ec2"]
},
{"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:DeleteObject“
],
"Resource": ["arn:aws:s3:::s3bucket-for-ec2/*"]
}
]
}
Step 2 : Create a EC2 instance with above role.
Select role while EC2 provisioning (Configure instance details) as
mentioned below:
Step 3 : Download source for S3fs project FUSE-based file system
backed by Amazon S3 .
Step 4 : Untar the file.
Step 5 : Install dependencies .
Step 6 : Configure the source.
Step 7 : Make the Source code.
Step 8 : Install the code .
Step 9 : Create a directory on which you want to mount S3 Bucket.
Step 10 : Mount the directory by specifying IAM Role. Create a file in
order to test the bucket write permission.
Step 11 : Check the S3 bucket.
Thanks
Looking Forward for your interest in DevOpsJourney.com
http://devopsjourney.com
Email us: mail@devopsjourney.com

More Related Content

Viewers also liked

Viewers also liked (7)

(SEC307) A Progressive Journey Through AWS IAM Federation Options
(SEC307) A Progressive Journey Through AWS IAM Federation Options(SEC307) A Progressive Journey Through AWS IAM Federation Options
(SEC307) A Progressive Journey Through AWS IAM Federation Options
 
Secure Amazon EC2 Environment with AWS IAM & Resource-Based Permissions (CPN2...
Secure Amazon EC2 Environment with AWS IAM & Resource-Based Permissions (CPN2...Secure Amazon EC2 Environment with AWS IAM & Resource-Based Permissions (CPN2...
Secure Amazon EC2 Environment with AWS IAM & Resource-Based Permissions (CPN2...
 
(SEC302) IAM Best Practices To Live By
(SEC302) IAM Best Practices To Live By(SEC302) IAM Best Practices To Live By
(SEC302) IAM Best Practices To Live By
 
Identity Access Management 101
Identity Access Management 101Identity Access Management 101
Identity Access Management 101
 
Identity and Access Management (IAM)
Identity and Access Management (IAM)Identity and Access Management (IAM)
Identity and Access Management (IAM)
 
(SEC305) How to Become an IAM Policy Ninja in 60 Minutes or Less
(SEC305) How to Become an IAM Policy Ninja in 60 Minutes or Less(SEC305) How to Become an IAM Policy Ninja in 60 Minutes or Less
(SEC305) How to Become an IAM Policy Ninja in 60 Minutes or Less
 
Identity and Access Management 101
Identity and Access Management 101Identity and Access Management 101
Identity and Access Management 101
 

More from devopsjourney (6)

5 Important Points To Remember If You Want To Reduce AWS EC2 Cost
5 Important Points To Remember If You Want To Reduce AWS EC2 Cost5 Important Points To Remember If You Want To Reduce AWS EC2 Cost
5 Important Points To Remember If You Want To Reduce AWS EC2 Cost
 
Understand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWSUnderstand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWS
 
Integrate AWS CodeDeploy With Git And Deploy A Revision
Integrate AWS CodeDeploy With Git And Deploy A RevisionIntegrate AWS CodeDeploy With Git And Deploy A Revision
Integrate AWS CodeDeploy With Git And Deploy A Revision
 
How to Write Chef Cookbook
How to Write Chef CookbookHow to Write Chef Cookbook
How to Write Chef Cookbook
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
 
Top 10 DevOps Areas Need To Focus
Top 10 DevOps Areas Need To FocusTop 10 DevOps Areas Need To Focus
Top 10 DevOps Areas Need To Focus
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Mount AWS S3 Bucket to EC2 with IAM Role

  • 1. Mount AWS S3 Bucket to EC2 with IAM Role - Ishant Kumar
  • 2. “Mount AWS S3 Bucket to EC2 with IAM Role” Amazon Simple Storage Service (Amazon S3), provides developers and IT teams with secure, durable, highly-scalable object storage. Amazon S3 is easy to use, with a simple web services interface to store and retrieve any amount of data from anywhere on the web. Source : http://aws.amazon.com/s3/  For object storage , we can mount S3 bucket to a particular directory in AWS EC2.
  • 3. Here are the steps : Step 1 : Create one IAM Role with policy having appropriate access to a particular bucket. For Example : IAM Role name is EC2RoleForS3Access. Policy attached (having Read/Write Access for bucket “s3bucket-for- ec2″ ) :
  • 4. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": ["arn:aws:s3:::s3bucket-for-ec2"] }, {"Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject“ ], "Resource": ["arn:aws:s3:::s3bucket-for-ec2/*"] } ] }
  • 5. Step 2 : Create a EC2 instance with above role. Select role while EC2 provisioning (Configure instance details) as mentioned below:
  • 6. Step 3 : Download source for S3fs project FUSE-based file system backed by Amazon S3 .
  • 7. Step 4 : Untar the file.
  • 8. Step 5 : Install dependencies .
  • 9. Step 6 : Configure the source.
  • 10. Step 7 : Make the Source code.
  • 11. Step 8 : Install the code .
  • 12. Step 9 : Create a directory on which you want to mount S3 Bucket.
  • 13. Step 10 : Mount the directory by specifying IAM Role. Create a file in order to test the bucket write permission.
  • 14. Step 11 : Check the S3 bucket.
  • 15. Thanks Looking Forward for your interest in DevOpsJourney.com http://devopsjourney.com Email us: mail@devopsjourney.com