Home > Blockchain >  Load objects in S3 bucket into Oracle on EC2
Load objects in S3 bucket into Oracle on EC2

Time:09-30

I have an S3 bucket which gets objects in flat file format and i would like to read each object when it comes and load the data into a table on Oracle on EC2. Can someone please suggest any method to do it?

CodePudding user response:

You can create a AWS Lambda function for s3:ObjectCreated event. Docs:https://docs.aws.amazon.com/AmazonS3/latest/userguide/NotificationHowTo.html

CodePudding user response:

You can use AWS Lambdas to be triggered as objects are uploaded into bucket s3 (s3:ObjectCreated:Put). So, in your lambda, you must configure a method to handle this event, in order to identify the bucket and key. From there, you can get the object and manipulate it to insert it into your Oracle database, for example.

You need to pay attention to the security group and VPC settings of lambda, to ensure that it will have access to EC2 instance that oracle is provisioned. I strongly recommend that you use AWS SAM to provisioning your lambda. It greatly facilitates the deployment, development, and testing of your serverless function.

https://docs.amazonaws.cn/en_us/lambda/latest/dg/with-s3-example.html See this doc for more examples.

  • Related