Access to resource denied after upgrading from 6.0.2 to 6.2.5
See original GitHub issueAfter upgrading an application that uses MassTransit with SQS transport (and a hosted service) from 6.0.2 to 6.2.5, I am getting the following exception in AWS.
Application startup exception: System.AggregateException: One or more errors occurred. (Access to the resource https://sqs.eu-west-1.amazonaws.com/<account id>/dev-quartz-sqs is denied.)
Amazon.SQS.AmazonSQSException: Access to the resource https://sqs.eu-west-1.amazonaws.com/<account id>/dev-quartz-sqs is denied.
Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
The error happens when the application starts.
I am unable to reproduce the error locally as it works fine with localstack.
Can you also reproduce the problem with the latest version?
Tested with both 6.2.4 and 6.2.5
Environment
- Operating system: Linux
- Dotnet version: 3.1.0
Steps to Reproduce
This is the startup code
public async Task StartAsync(CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
_logger.LogInformation("Starting the bus...");
_busControl.ConnectReceiveEndpointObserver(_receiveEndpointCheck);
try
{
await _busControl.StartAsync(cancellationToken).ConfigureAwait(false);
_scheduler.JobFactory = new MassTransitJobFactory(_busControl);
_logger.LogInformation("Starting scheduler");
await _scheduler.Start(cancellationToken);
}
catch (Exception)
{
await _scheduler.Shutdown();
throw;
}
_simplifiedBusCheck.ReportBusStarted();
_logger.LogInformation("Bus started");
}
There is also one recurring job that we are setting up with on application start
Expected Behavior
Access to SQS should work as it’s working normally with version 6.0.2
Actual Behavior
Getting an Amazon.SQS.AmazonSQSException exception
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Resolved issues | FortiGate / FortiOS 6.4.1
In transparent proxy policy with authentication on corporate firewall, it shows Access Denied after authentication. 620453. Application WAD crash several times ...
Read more >FortiOS 6.2.0 Release Notes
After upgrading FortiGate to 6.2.0, the interface allowaccess ... client tries to connect to HTTPS page, client gets message: Access Denied.
Read more >FortiPortal Release Notes
With an enhanced method to improve password security, all users must update their password upon login after upgrading to FortiPortal to 6.0.6.
Read more >ClearPass 6.2.5 Release Notes
16803. After upgrading to 6.2.0, a configuration file was deleted. This caused the Dissolvable Agent to not load the Clearpass Onguard portal page,...
Read more >8 Known issues
Proxy startup with MySQL 8.0.0-8.0.17. zabbix_proxy on MySQL versions 8.0.0-8.0.17 fails with the following "access denied" error:.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve some similar problems in the past. It was caused by invalid IAM permission setup. Maybe MT started using something extra around 6.2.x, hence the issue? You have to add some extra logs of AWS SDK - they contain to exact reason.
Once this setup is in place you should get tone of AWS logs including the response of failed request.
Thanks @Crozin I am not sure what new permissions MT requires. At the moment I tried to give the ECS task a full permission on sqs (sqs.*) and it still fails. I will try the AWS logging to see what’s the root cause.