Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda