skip to Main Content

Amazon web services – How to generate url for the s3 object without expiring?

I have uploaded an object with the client = boto3.client('s3', aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY) response = client.put_object( Bucket=BUCKET_NAME, Body=in_mem_file.getvalue(), Key=str(img_name)) and I'm generating the URL by url = client.generate_presigned_url('get_object', Params={ 'Bucket': BUCKET_NAME, 'Key': str(img_name)}, ExpiresIn=518400) I need to generate the URL without…

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