Aws Lambda Java for storing Image in S3 - java

I am trying to make a lambda function which will store the image in S3 bucket using Java .
The issue is my whenever I am invoking the Lambda using Http API, it gives me Internal server error. I have tried to use simple code to upload the text file in s3 bucket as well However it is not working.
I have set up a IAM role for this Lambda with following permissions:-
LambdaBasicExecution
S3 full Access
CloudWatch Logs
However my Lambda Function is not able to trigger the S3 bucket.
It seems that there is some issue with the configuration.
`

Answering if anyone face this issue like I faced:-
The issue was with Maven Dependency. I was using S3 SDK version which was picking up mismatch Object versions for other Aws SDKs and it was giving Internal Server Error.

Related

Running Azure Functions on Azure giving error: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable

I am new to Azure Functions and I am trying to follow the tutorial https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-java
to create a basic HTTP Trigger Function using Visual Studio code and to deploy the same to Azure.
I have created the function and executed it locally and has deployed the Java HTTP Trigger Function to Azure as well, but while trying to execute the function in Azure I am getting the following error:
Can anyone please help me in resolving the above error.
Thanks & regards,
Preethi H R
We have also tried to reproduced the issue ,But its working fine after following the below steps and configuration.
After Creating java function with http trigger and deployed to Azure checked the following if same or not which you have created in your local with version details.
Including that please check the configuration file if any of the localsettings is missed because when we deploy azure function to azure from local(VS/VSC) need to configure the localsettings manually in the configuration section.
For example:-
Tested successfully via postman in our environment:-
Please refer the below links for the similar issues:-
Similar SO THREAD| The resource you are looking for has been removed, had its name changed, or is temporarily unavailable" Laravel on Azure .
GitHub| Deployment error - Error: The resource you are looking for has been removed, had its name changed .

How to list all AWS S3 objects in a bucket using Java without using AWS SDK

I want to List of all the s3 bucket using java but due to some limitation I am not allowed to use AWS SDK.
Is there a way using java i can achieve this, limitation is I do not want to use AWS sdk, just a plain call to the aws service url , i have access key and secret key ,region, how do i set this information in the header and hit the service

How can we use minio storage as same as s3 url

How can we use minio storage as same as S3. Is there any need to change the code of java spring boot?. Previous codes are aws related. I don't want to change the code, But i want to access the storage from another source. Is that possible with minio.
I assume, that you are using the aws-java-sdk s3client. Therefore you just need to set the endpoint-configuration (for example http://localhost:9000, if minio runs on port 9000 on your local machine)
For more infos about the endpoint-configuration, you can look here

How to post a file into my s3 url in java?

I'm trying to practice using AWS more and I'm at a point where I can generate a S3 bucket URL. Now that I have that set up I'm trying to put a document (file) into that URL. Is there any useful documentation or things I should know when I try to do that? I can't seem to find anything on the web for Java users. (maybe I'm just bad at searching idk). Thanks
There is AWS SDK for Java provided by Amazon
AWS SDK For Java
Example work with S3
AWS example of loading file to s3:
https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-s3-objects.html#upload-object
and you would need a token to access you account resources from a java client more info here : https://aws.amazon.com/premiumsupport/knowledge-center/create-access-key/

Uploading Files to AWS S3 from an Android App

Edited 7th June,14
My Android app needs to have a feature where clients can upload their files. I want AWS S3 as my storage. Moreover i dont want to use SECRET_KEY and ACCESS_KEY_ID on client side. What is the the best way to do this. Can someone provide the working code too ?
I read that i can request to AWS for a signed URL and then make client directly upload to that URL. How to achieve this ?
Maybe you can call AWS APIs in step 4.
And please check the AWS STS(Security Token Service) document, "Ways to Get Temporary Security Credentials" section.

Categories

Resources