panza
panza

Reputation: 1431

Saving JSON files onto a S3 bucket

I have a requirement whereby a client will need to send files that will need to saved onto a S3 bucket. I will also need to parse the JSON and identify them based on certain key-pair values in order to save each of them into a specific folder/sub-folder.

Essentially I will need to expose the S3 bucket as an endpoint. I have read that it is possible to do so in VPC (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints-s3.html).

However, this seems to be only working with IPV4 and most importantly I am struggling to see how I can have the "filtering logic" to parse and save the files into the correct folder. Ultimately, my question is.

Can I instead use the API - Gateway + Lambda function to meet my requirements?

Is there any potential alternative approach to it?

Thanks

Upvotes: 0

Views: 1352

Answers (1)

javros
javros

Reputation: 823

You can expose an S3 bucket for your client, it's possible to setup it such a way that anyone would be able to upload files (of course, you can also setup an appropriate level of authentication). Then, once an object is placed inside the bucket, S3 can be setup to trigger an AWS Lambda function, which will take that object, parse it and place into correct folder.

Upvotes: 1

Related Questions