- Newest
- Most votes
- Most comments
Hello.
Is the policy for accessing S3 that outputs logs attached to the IAM role of the EC2 instance?
https://docs.aws.amazon.com/systems-manager/latest/userguide/patch-manager-patch-now-on-demand.html#run-patch-now
The S3 permissions that grant the ability to write the data to an S3 bucket are those of the instance profile (for EC2 instances) or IAM service role (hybrid-activated machines) assigned to the instance, not those of the IAM user performing this task. For more information, see Configure instance permissions for Systems Manager or Create an IAM service role for a hybrid environment. In addition, if the specified S3 bucket is in a different AWS account, make sure that the instance profile or IAM service role associated with the managed node has the necessary permissions to write to that bucket.
Specifically, I think it is possible to output logs to S3 if the IAM policy described in the document below is set in EC2.
https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-permissions.html#instance-profile-custom-s3-policy
Relevant content
- asked 6 months ago
- AWS OFFICIALUpdated 7 months ago
- published 3 years ago
