Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Omar Himada
    @omarhimada
    im not really sure what youre doing with that app.Use(async ... but if that doesnt work i think the problem is in there for sure
    Fagro Vizcaino
    @fagro-vizcaino
    Well, cannot use UseAuthorization because is just available for asp.net 3.0 upward
    i'm on asp.net core 2.1
    Omar Himada
    @omarhimada
    hm
    i mean its definitely being thrown from within that app.Use(async...
    i would debug and see what you can find inside there
    Fagro Vizcaino
    @fagro-vizcaino
    But what about the Correlation failed error ?
    Omar Himada
    @omarhimada
    what happens if instead of throwing a new exception there you do something else
    maybe it has something to do with throwing a new Exception() from within that context
    urothis
    @urothis
    Hey everyone, was looking for some assistance or some good example repos to take a look at, I'm implementing https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html I'm at step To initialize the device for use. I'm having a hard time determining which cert I'm supposed to be passing and if I need to generate a csr.
    Fagro Vizcaino
    @fagro-vizcaino
    @omarhimada I end up putting this :
    options.Events = new OpenIdConnectEvents
                            {
                                OnRemoteFailure = context =>
                                {
                                    if (context.Failure.Message.Contains("Correlation failed"))
                                        context.Response.Redirect("/");
                                    else
                                        throw new Exception("ERROR");
    
                                    context.HandleResponse();
    
                                    return Task.CompletedTask;
                                },
                           }
    Omar Himada
    @omarhimada
    did that work?
    Fagro Vizcaino
    @fagro-vizcaino
    yes
    Omar Himada
    @omarhimada
    cool man
    Fagro Vizcaino
    @fagro-vizcaino

    I'm facing another weird stuff, let me see if you guys point me to the right direction

    This is what I'm trying to accomplish:

    If the user login successfully and completed an operation and then instead of signing out just closes the browser tab. Now let's say that after a period of 10 minutes, the user decides to log in again I want to redirect the user to the login page. Instead of automatically login in and go directly to the homepage (that's the behavior that is currently happening).

    Omar Himada
    @omarhimada
    you want to configure session length
    Fagro Vizcaino
    @fagro-vizcaino
    @omarhimada I did, but it's not working. It clears all cookies after 20 min (with the browser close) but I don't any idea where that configuration is coming from.
    bakhtiyar-ospanov
    @bakhtiyar-ospanov
    Hi guys! Are there any updates on download progress callback for AWS Unity SDK (AmazonS3Client.GetObjectAsync)?
    Stiaan Jacobs
    @stiaanj

    Hello there, I hope someone can help me, I have been searching everywhere without finding a solution that works.

    I am using the AWS sdk in dotnet 3.1 worker service to process and upload files to MinIO. Smaller uploads work correctly using the low-level API, but as soon as uploads go over 25mb or so, the uploads get stuck at 100% on the CompleteMultipartUploadAsync. It eventually times out and then fails to complete the upload.

    Can someone push me in the right direction?

    Raymond Sanchez
    @agileraymond
    @stiaanj When you upload a 25mb or bigger, how many parts are you using to upload it?
    Stiaan Jacobs
    @stiaanj
    Its set to use 5mb chunks, 5 parts
    Brad Wight
    @bwarfson
    Hello there, is anyone using an AWS Serverless Application (.Net Core 3.1) with RDS for SQL Server? We are using ADO.net and the repository pattern. If so, what are some best practices for connection pooling? I've been searching and searching but not finding specific examples for AWS Serverless with RDS SQL Server. I've read up on RDS proxy but i guess that doesn't work with SQL Server.
    Omar Himada
    @omarhimada
    have you tried Dapper?
    if ever i cannot use entity framework dapper is right there to save the day
    Jeff Hotchkiss
    @hotchkj
    Hi, is there a way to have S3 uploads resume using the NET Transfer Utility? For example, there's an interruption uploading 20 parts to an object or signed URL, 10 parts are already present in S3, can we resume such that only the remaining 10 parts need to be uploaded? If not, is this something we could consider raising an issue & potential PR for?
    Oscar Andersson
    @NiceGuyAndersson
    Since there's no LoadTableAsync() in the .NetStandard2.0 binaries of DynamoDB, is it impossible to use the Document model in Unity with those binaries?
    Oscar Andersson
    @NiceGuyAndersson
    Actually, I suppose I could convert all my Documents to AttributeMaps and use the non-document functions for network calls
    MikeEllisARB
    @MikeEllisARB
    Hi, I'm having a hard time finding a working example for my scenario, so if anyone can point me in the right direction, I would appreciate it. I'm coming from IdentityServer4, so that's what I'm familiar with. Can I connect an ASP.NET Core app running on my own servers to Cognito for Authentication (and Authorization via Groups)? If so, when my app hits a secured method with [Authorize], can I have the user redirected to Cognito and its login prompt at that point, or do I have to present the user with my own login page and handle the authentication programmatically? Thanks!
    Philip Pittle
    @ppittle
    @ellismichaelarb - I haven't tried it myself, but have you tried the ASP.NET Core Identity Provider for Amazon Cognito? Think this should have what you need: https://aws.amazon.com/blogs/developer/introducing-the-asp-net-core-identity-provider-preview-for-amazon-cognito/
    MikeEllisARB
    @MikeEllisARB
    @ppittle Thanks, I am using that library, but that page leaves some important details out (or I'm just thick). This article has helped me and may have the answers. https://chandradev819.wordpress.com/2020/01/18/aws-cognito-service-in-asp-net-core-3-1-application/
    Sho Nagai
    @shoNagai

    First of all, thank you for the great work.
    I am creating an authentication process using Cognito's StartWithCustomAuthAsync, but I am having an issue with the userAttributes email being undefined in the lambda function that is triggered by this execution. Do you have a solution?

    • client side code

      private static IDictionary<string, string> CreateClientMetadata(string username)
            {
                Dictionary<string, string> meta = new Dictionary<string, string>
                {
                    { "USERNAME", username },
                    { "PASSWORD", Random.RandomString(30) },
                    { "name", username }
                };
                return meta;
            }
      
            private static IDictionary<string, string> CreateAuthParameters(string username)
            {
                var authParams = new Dictionary<string, string>
                {
                    { "USERNAME", username },
                    { "PASSWORD", Random.RandomString(30) },
                    { "email", "test@gmail.com" }
                };
                return authParams;
            }
      
            private CognitoUser CreateCognitoUser(string username)
            {
                var provider =
                    new AmazonCognitoIdentityProviderClient(new AnonymousAWSCredentials(), RegionEndpoint.APNortheast1);
                var userPool = new CognitoUserPool(Settings.POOL_ID, Settings.CLIENT_ID, provider);
                return new CognitoUser(username, Settings.CLIENT_ID, userPool, provider);
            }
      
            public async Task<string> Signup(string username)
            {
                var user = this.CreateCognitoUser(username);
      
                var authRequest = new InitiateCustomAuthRequest()
                {
                    ClientMetadata = this.CreateClientMetadata(username),
                    AuthParameters = this.CreateAuthParameters(username)
                };
                var authResponse = await user.StartWithCustomAuthAsync(authRequest).ConfigureAwait(false);
            }
    • lambda code

    import { CognitoUserPoolTriggerHandler } from 'aws-lambda';
    
    export const handler: CognitoUserPoolTriggerHandler = async event => {
        if (!event.request.session || !event.request.session.length) {
             event.request.userAttributes.email
        }
    }
    Phillip Haydon
    @phillip-haydon
    This message was deleted
    Omar Himada
    @omarhimada
    hello AWS folks. i've been integrating with Cognito quite a bit and oftentimes in a different medium
    but i've run into an exception lately that i've never seen before
    i've deployed a .NET core application to a windows server (not EC2) and its giving me this error whenever it makes a request
    Amazon.Runtime.AmazonServiceException: Unable to get IAM security credentials from EC2 Instance Metadata Service.
    
       at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials()
    
       at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentials()
    
       at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentialsAsync()
    
       at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext)
    
       at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
    
       at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext)
    
       at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
    
       at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
    
       at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext)
    
       at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext)
    
       at Amazon.Extensions.CognitoAuthentication.CognitoUserPool.FindByIdAsync(String userID)
    
       at Amazon.AspNetCore.Identity.Cognito.CognitoUserStore`1.FindByIdAsync(String userId, CancellationToken cancellationToken)
    
       at Amazon.AspNetCore.Identity.Cognito.CognitoUserManager`1.FindByIdAsync(String userId)
    
       at Amazon.AspNetCore.Identity.Cognito.CognitoSignInManager`1.PasswordSignInAsync(String userId, String password, Boolean isPersistent, Boolean lockoutOnFailure)
    does the aws-sdk think it is deployed in EC2? i believe it may be attempting to use 169.254.169.254
    i've tried a few things based on what i could find as issues on github/google/stackoverflow
    Omar Himada
    @omarhimada
    i can see that the credentials are being retrieved
    info: AWSSDK[0]
    
          Found AWS options in IConfiguration
    
    info: AWSSDK[0]
    
          Found credentials using the AWS SDK's default credential search
    Omar Himada
    @omarhimada
    any insight regarding my issue would be greatly appreciated
    still scratching my head on it
    Omar Himada
    @omarhimada
    it is apparent that AWSSDK works when deployed to AWS, and Azure, but when deployed to an on-premises Windows Server 2019 it craps the bed
    it is indeed making calls to 169.254.169.254, i confirmed this with a packet trace
    EC2Launch apparently configures the routing, but i don't want to turn my own Windows Server on-premises box into an EC2 instance just to get cognito authentication to work
    Jesse Ehrenzweig
    @jehrenzweig

    Question for you fine folks: I'm writing a .NET Core 3.1 console app (C#) with a custom DynamoDB property converter that implements Amazon.DynamoDBv2.DataModel.IPropertyConverter. It works as expected when I tag my POCO class using Amazon.DynamoDBv2.DataModel.DynamoDBPropertyAttribute:

    namespace MyStuff
    {
        using System;
        using System.Collections.Generic;
        using Amazon.DynamoDBv2.DataModel;
    
        public class Dashboard
        {
            [DynamoDBProperty(typeof(WidgetConverter))]
            public List<Widget> Widgets { get; set; }
        }
    }

    Is it possible to wire up the custom DynamoDB property converter without tagging up my POCO class property using the DynamoDBProperty attribute? I've seen some code snippets that add mappings via the context, but I've been unable to get any of them to work.

    amrdarawsheh
    @amrdarawsheh
    Anyone here uses aws transcribe with .NET core?
    Mark Davies
    @joro550

    Hey, hoping you can help - I've cloned the repo from master and am getting the following exception when running the tests:

    The value of the property 'type' cannot be parsed. The error is: The type 'AWSSDK_DotNet.IntegrationTests.Tests.DynamoDB.DynamoDBTests+Employee, AWSSDK.IntegrationTestUtilities.Net35' cannot be resolved.

    Is there a Getting started guide I can refer to

    1 reply
    danieltallentire
    @danieltallentire
    Hi - I've got a weird issue with the Lex API calling from dot net, wondering if anyone has ever troubleshooted something similar;
    I'm calling AmazonLexClient.PostText. On my debug environment and on one server this works fine. On another server, every call to PostText is doubled. It makes two almost simultaneous requests. I'm not calling PostText twice because I've stuck logging all around it. I've confirmed that they are two full requests by checking with Fiddler, and I can see both going through. Lex throws a wobbly because it has two requests at the same time, and sends me a 409 conflict exception, which is the response that comes back to my code, even though one of the requests is actually succesful. Any ideas?
    1 reply
    Chase Q. Aucoin
    @chaseaucoin

    Hey room, found a pretty big bug in the AWS SDK. The model generator is not correctly handling nullable types across all products. This could be creating transient errors or silent failures on your calls into the SDK across the entire platform. Just trying to get more visibility on it.

    aws/aws-sdk-net#1721

    DoraiswamyG
    @DoraiswamyG
    Hi - need to unzip an archive in s3. The file size will be within lambda limit of 500MB. Can some one point how to unzip the file from source bucket to another destination bucket in s3.