skip to Main Content

Is there an S3 endpoint which will take the access key, secret, and the file in the body, and then accept the file upload? I would rather not import the entire AWS SDK for just minimal operations.

My use case: I have an AWS lambda function which uploads files to S3. At the moment, I use the AWS SDK for the file upload, but this makes the lambda function package size larger than actually required, since I need to upload aws-sdk npm package along with my code.

2

Answers


  1. Yes! here is the AWS S3 official RestAPI documentation
    AWS s3 restAPI docs

    Login or Signup to reply.
  2. Is there an S3 endpoint which will take the access key, secret, and the file in the body, and then accept the file upload? I would rather not import the entire AWS SDK for just minimal operations.

    You never pass the access key and secret directly to the AWS API. You have to sign your requests with the key and secret. It is much easier to use the SDK than write custom request signing code.

    However, the AWS SDK is included in the AWS Lambda runtime environment. You don’t need to upload the SDK as part of your Lambda function deployment unless you need a different version of the SDK than the one provided in the runtime environment.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search