- Newest
- Most votes
- Most comments
Hello.
Could you also share the code contents of "EC2_UDHCP.py"?
Looking at the error message alone, I'm guessing that you're probably trying to download a file from an S3 bucket.
Since you are getting a 403 error, please check whether the IAM user has an IAM policy to access the S3 bucket or object specified in the code.
Also, if the S3 bucket name or object path is incorrect, a 403 error will occur, so please check that the S3 bucket name and object path are also correct.
many thanks , below is code I used as you assumed just to download file from S3 from Ec2 team below is all details
from dcn_code_repository.helpers.s3_helpers import init_s3_connections, download_file_from_s3, write_results_to_localfile
if __name__ == '__main__':
(s3_upload_conn, s3_download_conn) = init_s3_connections()
download_file_from_s3(s3_download_conn, "udhcp-backups-prod-iad", "DHCP_DATA_HOST_IAD7_BACKUP/2024-04-19-00-08-29/")
------
I informed that permission has granted we can open S3 access. by editing lpt to add an role with trust relation like { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "oakridge.ec2.aws.internal" }, "Action": "sts:AssumeRole" } ]
but still I got issue , this file name " s3://udhcp-backups-prod-iad/DHCP_DATA_HOST_IAD7_BACKUP/2024-04-19-00-08-29/"
D128835573/
Relevant content
- asked 3 years ago
- asked 7 months ago
- asked 3 years ago
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 16 days ago