With the information provided the easiest way I would find to do this is to first create a role with a policy that allows access to the bucket, then assign the role through the sts:AssumeRole action on the instance profile.
This should allow the instance to assume the role and have access to the bucket both manually and/or automating through SSM.
Can't download file from S3 bucket in another accountasked 2 years ago
Utilizing values returned from SSM Document in a Parent/Child Documentasked 2 months ago
Can I use SSM Automation runbook with awscli or something different?asked a month ago
How to Download any file from s3 using the pyspark kernel in emr notebook ?asked 2 years ago
Modify SSM Document using CDKasked 4 months ago
SSM Automation Run Command longer than default 3600 secondsasked 5 years ago
AWS Trigger Automation from CloudWatch scheduled eventasked 3 years ago
SSM Automation - Download file from S3 - Assume Roleasked 6 months ago
Download an object from S3 in a run documentasked 4 years ago
SSM Document Timeout in CDKasked 2 months ago