Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Carlos Fernandez
    @carlosrfernandez
    @tovbinm I thought those were 'manually' / 'internal' to AWS and the service models are generated from those models
    @neilgibbons how big are the files you're uploading?
    Neil Gibbons
    @neilgibbons
    < 50KBs
    size can vary but usually no higher than that
    Carlos Fernandez
    @carlosrfernandez
    That's odd, even with larger files I've not had any issues. Are you breaking on all exceptions?
    Neil Gibbons
    @neilgibbons
    I recently switched to synchronous calls and noticed the same thing - my code calls the S3 API, I see progress callbacks logging to 100% but the file doesnt appear in S3 and my API call never finishes
    So my code is just stuck waiting
    Carlos Fernandez
    @carlosrfernandez
    Damn, that's really odd
    Neil Gibbons
    @neilgibbons
    Ive turned on AWS logging too - but I see nothing logged by the API itself when this issue occurs
    Carlos Fernandez
    @carlosrfernandez
    I assume you're doing something like this:
    using (var client = new AmazonS3Client(_credentials, BucketRegion))
    using (var util = new TransferUtility(client))
    {
        try
        {
            await util.UploadAsync(stream: fileStream, bucketName: _bucketName, key: destinationFileName);
        }
        catch (AmazonS3Exception e)
        {
             Logger.Error(e, $"Error while uploading file {filePath} to S3");
             throw;
        }
    }
    whoops
    shit format
    Neil Gibbons
    @neilgibbons
    im using a TransferUtilityUploadRequest and calling the synchronous Upload method on TransferUtility
    Carlos Fernandez
    @carlosrfernandez
    Does the TUUploadRequest also take a fileStream? I haven't used that one
    Neil Gibbons
    @neilgibbons
    Takes a string file path
    TransferUtilityUploadRequest fileTransferUtilityRequest = new TransferUtilityUploadRequest
                            {
                                BucketName = BucketName,
                                FilePath = item.FileNamePath,
                                StorageClass = S3StorageClass.StandardInfrequentAccess,
                                PartSize = 6291456, // 6 MB.
                                Key = BucketPath + item.Key,
                                ContentType = "text/csv",
                                CannedACL = S3CannedACL.Private
                            };
    Carlos Fernandez
    @carlosrfernandez
    Are all those properties mandatory?
    I wonder if you're setting a part size to be too big. and it's just waiting? Is the file really 6mb?
    Neil Gibbons
    @neilgibbons
    Ooooo - good shout
    It does work though - this issue seems to be intermittant

    Docs say

    Gets or sets the part size of the upload in bytes. The uploaded file will be divided into parts the size specified and uploaded to Amazon S3 individually.

    Carlos Fernandez
    @carlosrfernandez
    Yes, this is because the TransferUtility class can do that. But you don't need to set the part size, because I believe it will do the "split" by itself if it detects a big file coming in
    Neil Gibbons
    @neilgibbons
    I assumed it would fallback gracefully if file not bigger than 6MB
    Carlos Fernandez
    @carlosrfernandez
    My guess is, they give you the option to set part size, if you want to do the partitioning yourself
    I wouldn't bother with it at first. Get the upload working
    And cross that bridge when you get to it :D
    Neil Gibbons
    @neilgibbons
    Ill give it a go
    Carlos Fernandez
    @carlosrfernandez
    :+1:
    Tamás Balogh
    @Lapeno94
    Hello guys,
    We found an issue which is related to sqsclient it can cause http socket exceptions.
    please contact me in private bc from company side I cannot share this in public.
    Regards,
    Tamas
    Henrique Dezani
    @henriquedezani
    Hi. I am using services.AddCognitoIdentity() in my ASP.net Core Application (2.2), but I am working with Web API, and the token result is given back with Cookie. How I get JWT instead of Cookie? The libraries are: Amazon.AspNetCore.Identity.Cognito and Amazon.Extensions.CognitoAuthentication. Thanks
    Ryan Stradling
    @rstradling
    It does not seem like the latest version of the SDK is available in Nuget. I need something >= https://github.com/aws/aws-sdk-net/releases/tag/3.3.580.0 because I need the sts identity. How is this normally updated and published? In nuget https://www.nuget.org/packages/AWSSDK.Core/ I only see version 3.3.103
    Rayhaan Quazi
    @rayhaanq
    Hi everyone, I had a quick question about .NET Core Identity Provider for Amazon Cognito found here: https://github.com/aws/aws-aspnet-cognito-identity-provider
    I added it to my .net core api and it's successfully secured my api. How do I access a user's cognito username though?
    Nitesh
    @nitesh455
    Hi all, Does anyone have any working example of Aws Personalize with .Net Sdk?
    Raymond Sanchez
    @agileraymond
    @rayhaanq you can use this site to decode your jwt token https://jwt.io/. Another option is to use the GetUser api call https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUser.html
    Stuart Morris
    @StuartMorris0
    Hi all, I am trying to use AWS Cognito in an ASP.Net 4.5 application. All the documentation/videos I can find online all relate to .Net Core instead. I am able to get a user logged in, but I am not sure which of the Access/ID/Refresh tokens should be stored in FormsAuthentication. We are simply trying to use Cognito as the IDP behind a controller/path access within a Web App.
    Raymond Sanchez
    @agileraymond
    @StuartMorris0 You can use email or username to store in FormsAuthentication.
    Stuart Morris
    @StuartMorris0
    @agileraymond Right. I understand that but which token should be stored. Also when trying to store the access or Id token. The JWT is too large once encrypted to be stored in a cookie so adding it fails.
    Stuart Morris
    @StuartMorris0
    Is this gitter active?
    stackunderflows
    @stackunderflows
    I'm trying to login via Cognito in a Xamarin Forms app. When I call user.StartsWithSrpAuthAsync, I get an exception of unable to verify secret hash for client. Is there a way to attach the secret hash to the CognitoUser class? I don't see a property for it. Does this nuget not support apps that have a secret?
    stackunderflows
    @stackunderflows
    I figured it out. When you instantiate a new CognitoUser, you have to use a constructor that allows you to pass in the secret. This is the only way to set it because the backing property is private.
    abiehusney25
    @abiehusney25
    anyone have a step by step instructions on how to set it up with Unity?