Executing HiveActivity on an existing EMR cluster (using workergroup) error - amazon-web-services

This is error:
ActivityFailed:AmazonServiceException:AmazonElasticMapReduce:AccessDeniedException
User: arn:aws:iam::833376745199:user/data_analytics is not authorized to perform: elasticmapreduce:DescribeCluster (Service: AmazonElasticMapReduce; Status Code: 400; Error Code: AccessDeniedException; Request ID: 593d224c-7097-11e6-a574-fd5be6acde1b)

Make sure that the IAM user that you're using to start the task runner has the elasticmapreduce:DescribeCluster permission. Unless you want to apply a more restrictive policy to your task runner, an easy way to do this would be to attach the AmazonEC2RoleForDataPipeline to your IAM user.

Related

How do I create an Ec2 instance role for AWS Datapipeline

What are the correct policies for EC2 Data Pipeline Default Resource Role. I am creating a datapipeline and struggling to give proper permissions to this role.
This is the error I get from the Datapipeline --> WARNING: Error occurred while validating resourceRole 'MyDatapipelineEC2Role'. Need iam:ListRolePolicies and iam:GetRolePolicy to validate. Error: User: arn:aws:sts::*********:assumed-role/MyDataPipelineRole/EDPSession is not authorized to perform: iam:ListRolePolicies on resource: role MyDatapipelineEC2Role because no identity-based policy allows the iam:ListRolePolicies action (Service: AmazonIdentityManagement; Status Code: 403; Error Code: AccessDenied; Request ID: f6566144-d887-4804-a041-cccc437933e2; Proxy: null)

How to fix AWS Elastic Bean Stalk severe health warning?

I have a spring java app that runs fine locally, but after uploading the jar file to elastic beanstalk, I'm unable to access the end point and the app health shows as severe.
in the logs it says the following:
User:
arn:aws:sts::487484241999:assumed-role/aws-elasticbeanstalk-ec2-role/i-0e95c4754f49ff217
is not authorized to perform: rds:DescribeDBInstances on resource:
arn:aws:rds:eu-west-2:487484241999:db:[redacted] because no
identity-based policy allows the rds:DescribeDBInstances action
(Service: AmazonRDS; Status Code: 403; Error Code: AccessDenied;
Request ID: 37290a99-f52c-4553-a614-90ffe980da97; Proxy: null)
I have set the correct permissions to the user, I think the issue has something to do with permissions/trust policies surrounding assumed-role

GlueJobRunnerSession is not authorized to perform: lakeformation:GetDataAccess on resource

I am trying to use glueContext.purge_table function in my aws glue job. Whenever the job is executed it throws the following error:
An error occurred while calling o82.purgeTable.
: java.lang.RuntimeException: class com.amazonaws.services.gluejobexecutor.model.AccessDeniedException:User: arn:aws:sts::012345678:assumed-role/XYZ/GlueJobRunnerSession is not authorized to perform: lakeformation:GetDataAccess on resource: arn:aws:glue:us-east-1:MICHIGAN_DEFAULT_CATALOG_ID_RANDOMIZED:table/database/table (Service: AWSLakeFormation; Status Code: 400; Error Code: AccessDeniedException; Request ID: 25829fe6-2a10-430a-b050-023c13bcc8ce; Proxy: null) (Service: AWSGlueJobExecutor; Status Code: 400; Error Code: AccessDeniedException; Request ID: ed60ddfa-8263-486a-b9f6-1dd57cbfd9bd; Proxy: null)
The following policies have been attached with the role:
Any help would be highly appreciated.
Just to add some clarity on this, you need to add "AWSLakeFormationDataAdmin" policy to the IAM role that you are using to run your Glue job.
Also, on Lake Formation side, you need to make sure the above principle (IAM role) has data lake permission to access the Glue metadata tables of the data catalog.
You also need to provide full LakeFormation access to your job role, since it seems you have LakeFormation active.

AWS Codestar Setup Beanstalk Policy Errors for Auto-scaling

I've been trying to use Codestar on AWS Ruby on Rails using Elastic Beanstalk. I tried applying and assigning auto scaling full access policies to no avail. Can anybody help me navigate around these errors? Also using root account. Tried assigning this under roles but no success.
Error messages:
Creating Auto Scaling group failed Reason: API: autoscaling:CreateAutoScalingGroup The default Service-Linked Role for Auto Scaling could not be created. com.amazonaws.services.identitymanagement.model.AmazonIdentityManagementException:
User: arn:aws:sts::**********:assumed-role/CodeStarWorker-phcnetworks-net-CloudFormation/AWSCloudFormation is not authorized to perform: iam:CreateServiceLinkedRole on resource: arn:aws:iam::**************:role/aws-service-role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling
(Service: AmazonIdentityManagement; Status Code: 403; Error Code: AccessDenied; Request ID: *******-******-*******)
Stack named 'awseb-e-*********-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBAutoScalingGroup].
The reported error says that the role "CodeStarWorker-phcnetworks-net-CloudFormation" is not authorized to perform operation iam:CreateServiceLinkedRole on the set of resources defined in IAM policy.So action "CreateServiceLinkedRole" needs to be added to the role for your autoscaling policies to succeed.

When I am trying to create a pipeline in amazon elastic transcoder using amazon console with IAM it gives me an error

user/abcd is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::453006003233:role/Elastic_Transcoder_Default_Role (Service: AmazonIdentityManagement; Status Code: 403; Error Code: AccessDenied;
We need to attach the policy ElasticTranscoderDefaultRole with the particular group to which the IAM is added.