I am trying to publish a .NET core 3.1 project from VS2019 into AWS Elastic Beanstalk. Once I fill all the information necessary for deployment and hit deploy, I get the following error on the output.
Unknown error executing command: One or more errors occurred.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Amazon.Common.DotNetCli.Tools.RoleHelper.ExpandInstanceProfile(IAmazonIdentityManagementService iamClient, String instanceProfile)
at Amazon.Common.DotNetCli.Tools.Commands.BaseCommand`1.GetInstanceProfileOrDefault(String propertyValue, CommandOption option, Boolean required, String newRoleName)
at Amazon.ElasticBeanstalk.Tools.Commands.DeployEnvironmentCommand.<CreateEnvironment>d__19.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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Amazon.ElasticBeanstalk.Tools.Commands.DeployEnvironmentCommand.<PerformActionAsync>d__16.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 Amazon.Common.DotNetCli.Tools.Commands.BaseCommand`1.<ExecuteAsync>d__10.MoveNext()
Anyone else having trouble with this?
You will have created an account which has the policy AWSElasticBeanstalkFullAccess. This account also needs to be allowed IAM:GetInstanceProfile permission.
As a quick test add the 'IAMFullAccess' policy to that account then try deploying. That should work. This violates the principle of least privilege though and isn't recommended on a production system - where you should enable only specific permissions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With