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?
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
}
}
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)
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.
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
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.
Hello - I'm using the CognitoIdentity SDK, I do not see where I can set the expiration of AWS Credentials.
I am using a two step process:
GetOpenIdTokenForDeveloperIdentity(),
GetCredentialsForIdentity()
I can only set the expiration on the OpenIdToken (1st method), but do not see where to set the expiration for the credentials method (2nd method)
Thank you in advanced for suggestions.
Adding onto the weird issues with S3...
I'm trying to get it working on android for Unity 2019.4 -- running into a NullReference in constructing InternalLog4NetLogger. I use log4net for another dependency, wondering if anyone has any tips. Here's the stack trace:
2020/11/19 08:59:48.166 8135 8160 Error Unity NullReferenceException: Object reference not set to an instance of an object.
2020/11/19 08:59:48.166 8135 8160 Error Unity at Amazon.Runtime.Internal.Util.InternalLog4netLogger..ctor (System.Type declaringType) [0x00000] in <00000000000000000000000000000000>:0
2020/11/19 08:59:48.166 8135 8160 Error Unity at Amazon.Runtime.Internal.Util.Logger..ctor (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
2020/11/19 08:59:48.166 8135 8160 Error Unity at Amazon.Runtime.Internal.Util.Logger.GetLogger (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
2020/11/19 08:59:48.166 8135 8160 Error Unity at Amazon.Util.Internal.AmazonHookedPlatformInfo..cctor () [0x00000] in <00000000000000000000000000000000>:0
2020/11/19 08:59:48.166 8135 8160 Error Unity at Amazon.UnityInitializer.Awake () [0x00000] in <00000000000000000000000000000000>:0
2020/11/19 08:59:48.166 8135 8160 Error Unity at UnityEngine.GameObject.AddComponent[T] () [0x00000] in <00000000000000000000000000000000>:0
2020/11/19 08:59:48.166 8135 8160 Error Unity at Amazon.UnityInitializer.AttachToGameObject (UnityEngine.GameObject gameObject) [0x00000] in <00000000000000000000000000000000>:0
aws-lambda-tools-defaults.json
is mostly used by the AWS Toolkit for Visual Studio tooling; it shouldn't be consumed by your application. defaults.json remembers the last place you deployed during development. appsettings.json
is meant to be consumed by your code. So if you have a lambda function that writes to a SQS queue, your code needs to know which region to look for that queue. For testing, you may configure your local tooling to deploy to US-WEST-2, that would be saved to defaults.json, but your application needs to connect to a queue in US-EAST-1, so the appsettings.json would have us-east-1.
Hi Guys, Im having some issues with setting up a dotnet server that can verify jwt generated from aws cognito.
I am using this sample as my guide. https://aws.amazon.com/blogs/developer/introducing-the-asp-net-core-identity-provider-preview-for-amazon-cognito/
this is what I have done so far
bearer <token>
I have tried to use both the app clients client id and secret to generate a JWT and both of them say unauthorized. Also I have not created any custom authorization policies. I am only after a authenticated resource at this point before I look at authorization