How do I access dynamodb(or lambda) from a real-time server?

0

is it possible?

I have included aws-sdk in realtime server (nodejs). But the server build failed.

If anyone knows how to do this, please respond.

thx

질문됨 5년 전249회 조회
16개 답변
0
수락된 답변

Hi-

The fix for this bug has now been deployed to all regions. Feel free to try again.

답변함 5년 전
0

Hi-

I'm going to loop in the engineer that validated the possibility of doing this on our side and see if they have any suggestions.

답변함 5년 전
0

This sounds like pretty much what they did. I'd suggest creating a super simple RTS fleet w/ no dependencies such that it goes active. Then update the script to what you have including the sdk. If that fails I think you should have some info available in the server logs.

If you still get stuck, let us know the fleet id along with where you got the version of the sdk you're using (npm, download, etc). We could then take a peek and see if we have further suggestions.

답변함 5년 전
0

I am facing the exactly same issue.

Please leave some tips if anyone knows any resolutions.

Other node modules, such as "loadash" and "hashish", can be loaded like below

var _ = require('loadash');
var Hash = require('hashish');

However, when aws-sdk is included in node_modules directory, the fleet seems to fail to be activated. Error occurs from Activating state.

Please let me know if you have resolved issues regarding loading aws-sdk.

Much appreciated in advance.

답변함 5년 전
0

@REDACTEDUSER

I am tagging you because you seem like you have answered a lot fo questions and might have an idea about this issue.

Please let me know if there is a resolution for it.

Thanks.

답변함 5년 전
0

hi brian, thank you for respond. i tried a simple rts but got fail. im using npm(sdk) version 2.493.0.

fleet id : fleet-******

답변함 5년 전
0

Hi @REDACTEDUSER

Thanks for your kind suggestion.

I have tried as you suggested with several other cases, however, the fleets do not seem to be updated after editing the scripts to new versions. Furthermore, no error logs come up and the fleet is created based on the previous version. I would like to know what is actually going on.

I am using npm and the version 2.488.0 and the fleet ids are fleet-******

please let me know if you get to know anything..

Thanks,

Bobby

답변함 5년 전
0

Your help would be much appreciated.

I am literally stuck and not making any progress from that point.

Please check it out for me @REDACTEDUSER

Thanks very much in advance.

답변함 5년 전
0

Hi, @REDACTEDUSER

I want to know how things work.

It's been a while since I posted my answer, but I have not responded yet, so I reply again.

답변함 5년 전
0

@REDACTEDUSER

I am tagging you expecting you can give me a solution for it since @REDACTEDUSER

Please have a look at this error and let me know what I can do about it.

Thanks very much in advance.

답변함 5년 전
0

Hi-

Thanks for the information. We are investigating and will reply once we have more information.

답변함 5년 전
0

Hi @REDACTEDUSER

I could not afford to keep those fleets due to their pricing. I have deleted them. If you find out anything or have other suggestions, please let me know.

Thanks, Bobby

답변함 5년 전
0

Hi,

@REDACTEDUSER

I took a look at your fleets and I can confirm that there is a bug with the RTS feature where scripts with aws-sdk fail to go active(or fails at updateScript). We have created a backlog item to address this bug, I will update this post once the fix for the issue is out.

답변함 5년 전
0

Hi, @REDACTEDUSER Fixed bugs were builded. but in the dynamodb(or lambda) script part, the build failed again.

Added part :

var aa = new AWS.DynamoDB.DocumentClient();

or

var aa = new AWS.Lambda();

Please Show me the example test code used to solve the problem.

답변함 5년 전
0

Do you have an example of what your logs show here? How is this code failing? Things could fail due to bad code or bad configuration. Are you failing including the SDK ie

var AWS = require("aws-sdk");

AWS.config.update({
    region: "us-west-2",
    ...
});

You can debug some of this yourself while waiting for the GameLift team to respond:

  1. Deploy a minimal server that works
  2. Remote access your instance in a fleet: https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-remote-access.html
  3. Tail your logs and ensure everything is working
  4. Update your script package

1-3 are optional, just so you can be in a clean state. You can also scale your fleet to 0 and then back to 1.

답변함 5년 전
0

The important thing to get right is the structure of your zip. It should look something like:

myscript.js node_modules/aws-sdk/.....

Can you confirm whether or not that's currently the case for you?

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠