Closed rsalas8 closed 3 years ago
Hello, probably credentials missing from your shared credentials file. Does the following command work for you?
If not, please try to create a set of local user credentials. Instructions here
Al Murray :)
Here is the output of 'aws iam get-user':
The docs state that the credentials are stored in ~/.aws directory. My credentials are being stored somewhere but I couldn't find where. There is no ~/.aws directory on my system (Windows 10).
C:\src\github.com\amazon-gamelift-unity-master\Build>aws configure AWS Access Key ID [****2CKE]: AWS Secret Access Key [****8gVq]: Default region name [us-east-1]: Default output format [json]:
C:\src\github.com\amazon-gamelift-unity-master\Build>ls \users\rosssalas '3D Objects' NetHood AppData OneDrive 'Application Data' Pictures 'Cisco Packet Tracer 7.2' PrintHood 'Cisco Packet Tracer 7.3.1' PycharmProjects
Hello rsalas8!
On Windows, the credentials
file is in your user folder (yours is called C:\Users\rosssalas\
), in the .aws
subdir, see this example of mine (secret key is private to you, do not share this with me)
As you see, there is a [default]
profile in my file. This is the one that is used by the deploy tool to call AmazonIdentityManagementServiceClient.GetUser()
. I'm guessing, but maybe you have set up different permissions using named profiles, or you are missing a default profile, or you have set the AWS_PROFILE
environment variable to a profile that does not exist.
To reproduce this, I rename my [default]
profile and call it [nothing]
, the file looks like this
Calling deploy results in the same error as you see.
But then I can set the AWS_PROFILE
environment variable to the profile name with the permissions and it works.
You can force the profile to a named profile in the command line test before.
Let me know if this helps,
Al Murray :)
Oh, one other detail! the .aws
directory is a hidden directory. You will only see it in File Explorer if you check to view hidden items.
Thanks for following up. This literally had me racking my brain. This whole time I have been using Windows 10 Command Prompt to build this project. For some reason, the 'aws configure' command was storing my credentials to git bash home (~) directory (subdir .aws). However, the deploy (deploytool) wasn't aware of that environment. That's why I continued receiving authentication errors when deploying. After uninstalling git bash, it worked like a charm. Thanks again!
Thank you, glad it's all working now.
Hi,
First, thanks for the sample. Following step-by-step, I ran into an error. The game runs locally (rs,rc,rc,rc) however it craps out when deploying. I tried recreating the user several times. I still get the same error. Not sure what's going on. Looks like it's calling deploytool.exe. Not sure why it's not happy. Thanks!
C:\Users\rosssalas\src\github\amazon-gamelift-unity\Build>deploy.bat 25.0 PLEASE WAIT. DEPLOYMENT PROCESS TAKES A FEW MINUTES. Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials() at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentials() at Amazon.Runtime.Internal.CredentialsRetriever.PreInvoke(IExecutionContext executionContext) at Amazon.Runtime.Internal.CredentialsRetriever.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.RetryHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.EndpointResolver.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.Marshaller.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.PipelineHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.MetricsHandler.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.Internal.RuntimePipeline.InvokeSync(IExecutionContext executionContext) at Amazon.Runtime.AmazonServiceClient.Invoke[TRequest,TResponse](TRequest request, IMarshaller`2 marshaller, ResponseUnmarshaller unmarshaller) at Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.GetUser(GetUserRequest request) at Amazon.IdentityManagement.AmazonIdentityManagementServiceClient.GetUser() at DeployTool.Program.GetAWSNum() at DeployTool.Program.d4.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DeployTool.Program.d 3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at DeployTool.Program.Main(String[] args) C:\Users\rosssalas\src\github\amazon-gamelift-unity\Build>dir Volume in drive C is Local Volume Serial Number is 4A0A-D470 Directory of C:\Users\rosssalas\src\github\amazon-gamelift-unity\Build 10/14/2020 08:25 PM . 10/14/2020 08:25 PM .. 10/14/2020 08:25 PM 1,171 build.bat 10/14/2020 08:25 PM 4,561 buildconfig.bat 10/14/2020 08:25 PM 3,108 builddeploytool.bat 10/14/2020 08:25 PM 12,824 buildsdk.bat 10/14/2020 08:25 PM 2,833 clean.bat 10/14/2020 08:25 PM 2,350 delconfig.bat 10/14/2020 08:25 PM 1,683 deploy.bat 10/14/2020 08:25 PM 2,071 distro.bat 10/14/2020 08:25 PM FixSdk 10/14/2020 08:25 PM 2,062 loadconfig.bat 10/14/2020 08:25 PM 1,277 profile.bat 10/14/2020 08:25 PM 1,569 rc.bat 10/14/2020 08:25 PM 845 rs.bat 10/14/2020 08:25 PM 3,239 saveconfig.bat 13 File(s) 39,593 bytes 3 Dir(s) 121,293,103,104 bytes free