skip to Main Content

Connect to AWS S3 bucket from Nodejs app ( persistent connection required)

I have nodejs/express app from which I want to connect to AWS S3. I do have a temporary approach to make connection, environment file aws_access_key_id=XXX aws_secret_access_key=XXXX/ aws_session_token=xxxxxxxxxxxxxxxxxxxxxxxxxx S3-connection-service.js const AWS = require("aws-sdk"); AWS.config.update({ accessKeyId: `${process.env.aws_access_key_id}`, secretAccessKey: `${process.env.aws_secret_access_key}`, sessionToken: `${process.env.aws_session_token}`, region:…

VIEW QUESTION

Amazon web services – Error while generating AWS session token using java

I am trying to use session token using AWS sts_client AWSSecurityTokenService sts_client = AWSSecurityTokenServiceClientBuilder.standard() .withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("https://sts.ap-southeast-2.amazonaws.com", "ap-southeast-2")) .withRegion(Regions.AP_SOUTHEAST_2).build(); getting below error. java.lang.IllegalStateException: Only one of Region or EndpointConfiguration may be set. at com.amazonaws.client.builder.AwsClientBuilder.setRegion(AwsClientBuilder.java:450) ~[aws-java-sdk-core-1.12.234.jar:na] at com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(AwsClientBuilder.java:424) ~[aws-java-sdk-core-1.12.234.jar:na] at com.amazonaws.client.builder.AwsSyncClientBuilder.build(AwsSyncClientBuilder.java:46) ~[aws-java-sdk-core-1.12.234.jar:na]…

VIEW QUESTION
Back To Top
Search