Questions tagged with Developer Tools

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Is X-Ray on Lambda Compatible with .NET Ahead-of-Time compilation?

When attempting to set up XRay in a .NET/C# Lambda function published with AOT, I am getting the following error upon invoking the function: ``` Unhandled Exception: System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property. ---> System.MissingMethodException: No parameterless constructor defined for type 'Amazon.XRay.Recorder.Core.Sampling.Local.SamplingConfiguration'. at System.ActivatorImplementation.CreateInstance(Type, Boolean) + 0x120 at ThirdParty.LitJson.JsonMapper.ReadValue(Type, JsonReader) + 0x483 at ThirdParty.LitJson.JsonMapper.ToObject[T](TextReader) + 0x4f at Amazon.XRay.Recorder.Core.Sampling.Local.LocalizedSamplingStrategy.Init(Stream) + 0x60 at Amazon.XRay.Recorder.Core.Sampling.Local.LocalizedSamplingStrategy.InitWithDefaultSamplingRules() + 0x53 at Amazon.XRay.Recorder.Core.AWSXRayRecorder..ctor(ISegmentEmitter) + 0x5e at Amazon.XRay.Recorder.Core.AWSXRayRecorder..cctor() + 0xcd at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xb9 --- End of inner exception stack trace --- [...] ``` I've tried adding the following to rd.xml, to no avail: ```xml <Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata"> <Application> <Assembly Name="bootstrap" Dynamic="Required All"/> <Assembly Name="AWSSDK.Core" Dynamic="Required All"/> <Assembly Name="AWSSDK.SecretsManager" Dynamic="Required All"/> <Assembly Name="AWSSDK.XRay" Dynamic="Required All"/> <Assembly Name="AWSXRayRecorder.Core" Dynamic="Required All"/> <Assembly Name="AWSXRayRecorder.Handlers.AwsSdk" Dynamic="Required All"/> <Assembly Name="System.Configuration.ConfigurationManager"> <Type Name="System.Configuration.ClientConfigurationHost" Dynamic="Required All" /> <Type Name="System.Configuration.AppSettingsSection" Dynamic="Required All" /> </Assembly> </Application> </Directives> ``` My initialization code is as follows: ```c# AWSSDKHandler.RegisterXRayForAllServices(); AWSXRayRecorder.InitializeInstance(); // pass IConfiguration object that reads appsettings.json file ``` Any ideas?
0
answers
0
votes
2
views
Jason T
asked 33 minutes ago

Lambda deploy from Eclipse not working: JAXBException

Hello, - - I could not run option: AWS Toolkit for Eclipse -> Upload function to AWS Lambda, on eclipse jee-2021-09, Version: 2021-09 (4.21.0), Build id: 20210910-1417 - The archive is created on local drive, but it is not uploaded; so, the jaxb issue is not related to archive internals, but to some aws-eclipse interraction - AWS Explorer is working - Eclipse error: An internal error occurred during: "Uploading function code to Lambda": javax/xml/bind/JAXBException - I looked for solutions in the internet but they did not worked (seams that is a java version deprecation of jaxb) - Where from should I get the jaxb package and dependencies (please add link to work with com.amazonaws.eclipse.javasdk) and how should I add them to Eclipse ? - Full error stack: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at com.amazonaws.util.Md5Utils.md5AsBase64(Md5Utils.java:104) at com.amazonaws.services.s3.AmazonS3Client.putObject(AmazonS3Client.java:1647) at com.amazonaws.eclipse.lambda.upload.wizard.util.UploadFunctionUtil.performFunctionUpload(UploadFunctionUtil.java:95) at com.amazonaws.eclipse.lambda.upload.wizard.UploadFunctionWizard.doFinish(UploadFunctionWizard.java:111) at com.amazonaws.eclipse.core.plugin.AbstractAwsJobWizard$1.run(AbstractAwsJobWizard.java:35) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException cannot be found by com.amazonaws.eclipse.javasdk_1.11.248 at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 6 more Thanks a lot for answer, Mihai
0
answers
0
votes
22
views
asked 2 days ago

Lambda deploy from Eclipse not working: AWS ResourceConflictException

Hello, Please see below the steps that return an AWS error in local Eclipse: - I installed AWS Toolkit for Eclipse, on Eclipse Jee 2018-12 - When I installed it 2 years ago, it worked fine and the lambda project was deployed in the Lambda Service directly from Eclipse without any configuration from my side; congratulations for this clean deploy configuration ! - An year ago this deploy started not to complete successfully: it worked only until the transfer of the eclipse archive in S3, without installation in Lambda Service. I have to do the installation of the S3 archive from the Management Console -> Lambda console, manually. - The Error Cause: **An update is in progress for resource**: arn:aws:lambda:us-east-2:<removed>:function:RekonAddUser (Service: AWSLambda; Status Code: 409; Error Code: **ResourceConflictException**; Request ID: 408040a5-f1fe-4ba0-b251-df0c2fc8fe9c) This cause was thrown wile I did not have any other interaction with that resource ! - The message was: Failed to upload project to Lambda - The error was: com.amazonaws.eclipse.core.exceptions.AwsActionException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-2:<removed>:function:RekonAddUser (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: 408040a5-f1fe-4ba0-b251-df0c2fc8fe9c) at com.amazonaws.eclipse.lambda.upload.wizard.UploadFunctionWizard.doFinish(UploadFunctionWizard.java:115) at com.amazonaws.eclipse.core.plugin.AbstractAwsJobWizard$1.run(AbstractAwsJobWizard.java:35) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: com.amazonaws.services.lambda.model.ResourceConflictException: The operation cannot be performed at this time. An update is in progress for resource: arn:aws:lambda:us-east-2:<removed>:function:RekonAddUser (Service: AWSLambda; Status Code: 409; Error Code: ResourceConflictException; Request ID: 408040a5-f1fe-4ba0-b251-df0c2fc8fe9c) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1639) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1304) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1056) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:743) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:717) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667) at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513) at com.amazonaws.services.lambda.AWSLambdaClient.doInvoke(AWSLambdaClient.java:2654) at com.amazonaws.services.lambda.AWSLambdaClient.invoke(AWSLambdaClient.java:2630) at com.amazonaws.services.lambda.AWSLambdaClient.executeUpdateFunctionCode(AWSLambdaClient.java:2514) at com.amazonaws.services.lambda.AWSLambdaClient.updateFunctionCode(AWSLambdaClient.java:2490) at com.amazonaws.eclipse.lambda.upload.wizard.util.UploadFunctionUtil.performFunctionUpload(UploadFunctionUtil.java:134) at com.amazonaws.eclipse.lambda.upload.wizard.UploadFunctionWizard.doFinish(UploadFunctionWizard.java:111) ... 2 more - The Session Data: eclipse.buildId=4.10.0.I20181206-0815 java.version=1.8.0_60 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB Framework arguments: -product org.eclipse.epp.package.jee.product Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product Thank you,
1
answers
0
votes
36
views
asked 6 days ago

Concurrent executions of Lambda functions

I would like to understand how many calls of a Lambda function, through AWS-SDK, I can perform simultaneously. Now I am a free tier and it seems that I can't performe more than 10 concurrently executions. In my project, each client is going to make running a function and so the number of concurrently executions that my aws account can performe would be equal to the number of clients that my web app can serve simultaneously. I will be fine with 1000 at the beginning. Is it possible? How many concurrently executions my aws account (if not anymore free tier) could manage of a single function and overall through all functions by default? I will use Europe (Milano) region. With my account, right now, I can performe 10 concurrent executions of my function. I attached my concurrency data in the image:![Enter image description here](/media/postImages/original/IMS9LLlqoWQcqO9cDBFWBcOw) And my code:; import AWS from 'aws-sdk'; AWS.config.update({ accessKeyId: 'idKey', secretAccessKey: 'SecretKey', region: 'eu-west-3', }); const lambda = new AWS.Lambda(); var Utente = {feature: "feature"}; const params = { FunctionName: 'Lambda', Payload: JSON.stringify(Utente) }; ˙ lambda.updateFunctionConfiguration({ FunctionName: 'Lambda', Environment: { Variables: {} } }).promise(); function Invokation(params){ lambda.invoke(params, (error, data) => { if (error) { console.log(error) } else { console.log("OK") } }) }; for (let index = 0; index < 20; index++) { console.log(index); Invokation(params); }
1
answers
0
votes
28
views
asked 9 days ago