Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
Unable to copy objects on S3

I'm trying to copy video files from in my store from one folder to another. The files are all under 1GB. Everytime I try, I get an exception.

Name of S3 store: BandMedia

example files:

SourceFileName: VideoFiles/Band1/video1_38372836.mp4

DestinationFileName: VideoFiles/Band2/video1_47296110.mp4

The folder "VideoFiles" exist on my AWS S3 store.

However, the band name for the DestinationFileName is new(Band2).

So maybe it's not copying over because of that? Would I need to create the folder for the band first, and then do the copy? But I'm pretty sure I read in the SDK documentation that if the folder doesn't exist, it will be automatically created.

Here's the code that copied pretty much from the AWS SDK examples:

  Try
        Dim AppSettings As Specialized.NameValueCollection = System.Configuration.ConfigurationManager.AppSettings()
        Dim AwsAccessKey As String = "xxxxxx"
        Dim AwsSecretKey As String = "11111"
        Dim AwsBucketName = "BandMedia"
        Dim AwsRegionEndpoint As String = AwsEndPoint

        Dim AwsRegionEndpointObj As RegionEndpoint = RegionEndpoint.GetBySystemName(AwsRegionEndpoint)
        Dim s3 = New Amazon.S3.AmazonS3Client(AwsAccessKey, AwsSecretKey, AwsRegionEndpointObj)

        Dim cRequest As CopyObjectRequest
        Dim cReponse As CopyObjectResponse

        cRequest = New CopyObjectRequest()

        With cRequest
            .SourceBucket = AwsBucketName
            .DestinationBucket = AwsBucketName
            .SourceKey = SourceFileName
            .DestinationKey = DestinationFileName
            .CannedACL = S3CannedACL.PublicRead
        End With

        cReponse = s3.CopyObject(cRequest) 
        Return cReponse.HttpStatusCode = 200
    Catch ex As AmazonS3Exception 
        Return False
    End Try
    

Here's the error:

Exception thrown: 'System.Exception' in videoMusicApp.dll Exception while copying file VideoFiles/Band1/video1_38372836.mp4 to VideoFiles/Band2/video1_47296110.mp4

Another thought...maybe it's because it's on the same store?

Honestly, I don't know though.

Could anyone help me out? Thanks!

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!