I have few files in an ec2 machine of Account A. I would like to copy these files to a s3 bucket in Account B with User A. Could you please guide me with the necessary IAM policy or the list of procedures to be followed to achieve this?
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
aws --profile accounta s3 sync ./source/ s3://target-bucket/
1.Check if you have IAM roles or policies which will allow the required process if not set up required rules to allow cross-account access.
2.check if the AWS CLI is installed on EC2 instance, if not install it.
3.then configure the AWS CLI with the help of "aws configure"
4.after configuring you can use command "aws s3 cp /path/to/local/file s3:///path/to/s3/