Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

194
Visualizações
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!

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda