Accessing AWS S3 bucket from azure devops without having a service connection

%3CLINGO-SUB%20id%3D%22lingo-sub-3296344%22%20slang%3D%22en-US%22%3EAccessing%20AWS%20S3%20bucket%20from%20azure%20devops%20without%20having%20a%20service%20connection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3296344%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%2C%3C%2FP%3E%3CP%3EI%20want%20to%20upload%20and%20download%20artifacts%20to%20AWS%20S3%20bucket%20(build%20artifacts)%20from%20azure%20devops.%20There%20are%20pre-defined%20tasks%20(amazon%20S3%20upload%20and%20download)%20available%20in%20azure%20devops%20to%20do%20this%2C%20but%20i%20am%20unable%20to%20use%20these%20tasks%20as%20my%20organization%20is%20not%20allowing%20to%20create%20a%20service%20connection%20between%20azure%20Devops%20and%20AWS%20(not%20interested%20to%20share%20IAM%20user%20Access%20key%20and%20Secret%20key).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EInstead%20my%20organization%20has%20created%20a%20IAM%20role%20and%20policy%20and%20attached%20this%20IAM%20role%20to%20one%20of%20the%20EC2%20instance.%20Now%20from%20this%20EC2%20instance%20how%20can%20i%20upload%20and%20download%20artifacts%20to%20S3%20bucket%20using%20Azure%20Devops%3F%20Please%20guide...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3340886%22%20slang%3D%22en-US%22%3ERe%3A%20Accessing%20AWS%20S3%20bucket%20from%20azure%20devops%20without%20having%20a%20service%20connection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3340886%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1374774%22%20target%3D%22_blank%22%3E%40Johnd1770%3C%2FA%3E%26nbsp%3B%20-%20try%20to%20run%20a%20code%20on%20Ec2%20instance%20which%20pulls%20the%20objects%2Fartifacts%20from%20azure%20devops%20source%20and%20then%20pushes%20the%20code%20back%20to%20AWS%20S3%20bucket.%20I%20think%20EC2%20instance%20should%20have%20access%20to%20internet.%3C%2FP%3E%3CP%3EI%20donot%20think%20azure%20devops%20pipeline%20will%20be%20helpful%20as%20you%20have%20not%20made%20connection%20to%20AWS%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3357369%22%20slang%3D%22en-US%22%3ERe%3A%20Accessing%20AWS%20S3%20bucket%20from%20azure%20devops%20without%20having%20a%20service%20connection%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3357369%22%20slang%3D%22en-US%22%3EYou%20may%20install%20and%20config%20the%20self%20hosted%20agent%20on%20that%20Ec2%20instance.%20Create%20the%20azure%20pipeline%20as%20per%20the%20need%2C%20and%20run%20the%20pipeline.%20The%20role%20attached%20to%20EC2%20instance%20will%20help%20to%20perform%20the%20required%20action.%3C%2FLINGO-BODY%3E
New Contributor

Hi ,

I want to upload and download artifacts to AWS S3 bucket (build artifacts) from azure devops. There are pre-defined tasks (amazon S3 upload and download) available in azure devops to do this, but i am unable to use these tasks as my organization is not allowing to create a service connection between azure Devops and AWS (not interested to share IAM user Access key and Secret key). 

 

Instead my organization has created a IAM role and policy and attached this IAM role to one of the EC2 instance. Now from this EC2 instance how can i upload and download artifacts to S3 bucket using Azure Devops? Please guide...

1 Reply
You may install and config the self hosted agent on that Ec2 instance. Create the azure pipeline as per the need, and run the pipeline. The role attached to EC2 instance will help to perform the required action.