I am using AWS SQS, SNS, and S3 services. So for that i have created the roles and queues in aws. Now I have roles ARNs and Queues ARNs. How can I connect to these services through my spring boot app?
CodePudding user response:
So the idea is that Assuming Roles is not application part, it's the infra service where your application is executing on.
For e.g.: If you have Spring Boot application running on EC2 (or Fargate, or Lambda, or Elastic Beanstalk or anywhere in AWS) that EC2 should have assumed the role. The "role" then should have rights to access SQS (or any service). Now when your application will try to use SQS running on EC2 with right role, everything will be fine.
If you're testing the code on your machine then it will not work as your machine has not assumed the role.