amazon-iam

Access AWS API Gateway with IAM roles from Python

帅比萌擦擦* 提交于 2019-12-05 03:27:25
I have an AWS API Gateway that I would like to secure using IAM Roles . I am looking for a package to help me accessing it using Python. I am trying to avoid implementing the entire Version 4 Signing Process . I am sure there must be some library I can use. I looked into aws-requests-auth but it requires a "aws_service" to generate the signature. I looked also to boto3 but I am not able to find any way to just add authentication headers to a general request. You can use aws-requests-auth to generate the signature for your request to API Gateway with execute-api as the service name. import

Automatic AWS DynamoDB to S3 export failing with “role/DataPipelineDefaultRole is invalid”

一曲冷凌霜 提交于 2019-12-05 02:12:26
Precisely following the step-by-step instructions on this page I am trying to export contents of one of my DynamoDB tables to an S3 bucket. I create a pipeline exactly as instructed but it fails to run. It seems that it has trouble identifying/running an EC2 resource to do the export. When I access EMR through AWS Console, I see entries like this: Cluster: df-0..._@EmrClusterForBackup_2015-03-06T00:33:04Terminated with errorsEMR service role arn:aws:iam::...:role/DataPipelineDefaultRole is invalid Why am I getting this message? Do I need to set up/configure something else for the pipeline to

How to open anonymous access to AWS API Gateway resource

拈花ヽ惹草 提交于 2019-12-05 00:36:01
问题 I have a number of lambda functions exposed via the AWS Gateway Service as such: - /some-resource GET POST OPTIONS - /some-other-resource GET POST OPTIONS - /some-public-resource GET OPTIONS The resources are secured with Access Tokens. However, I would like to allow anonymous access to the /some-public-resource resource, so that it can be accessed without requiring any authentication. I have tried to create a policy in IAM for that resource's ARN (although I am not sure that I got the

PySpark using IAM roles to access S3

£可爱£侵袭症+ 提交于 2019-12-04 22:48:51
问题 I'm wondering if PySpark supports S3 access using IAM roles. Specifically, I have a business constraint where I have to assume an AWS role in order to access a given bucket. This is fine when using boto (as it's part of the API), but I can't find a definitive answer as to if PySpark supports this out of the box. Ideally, I'd like to be able to assume a role when running in standalone mode locally and point my SparkContext to that s3 path. I've seen that non-IAM calls usually follow : spark

Terraform - assume_role_policy - similar but slightly different than standard IAM policy

浪子不回头ぞ 提交于 2019-12-04 13:05:16
问题 This page https://www.terraform.io/docs/providers/aws/r/iam_role.html mentions: NOTE: This assume_role_policy is very similar but slightly different than just a standard IAM policy and cannot use an aws_iam_policy resource. It can however, use an aws_iam_policy_document data source, see example below for how this could work. Is there any reason why the assume_role_policy is different from the standard IAM policy ? Any why? 回答1: An assume role policy is a special policy associated with a role

Amazon API Gateway IAM authenticated example with generated JS SDK

感情迁移 提交于 2019-12-04 12:54:45
I have created sample GET and POST APIs on Amazon API Gateway following their official documentation. I have generated JS SDK for these APIs, which I am using to call these APIs from a client-side JS file hosted on S3. This works flawlessly without any 'Authorization Type'. Now, when I set 'Authorization Type' for GET method as 'IAM', I am required to pass IAM credentials in order for it to work. In spite of passing my AWS account's root credentials, I am getting this in the response headers: x-amzn-ErrorType:InvalidSignatureException:http://internal.amazon.com/coral/com.amazon.coral.service/

AWS EC2 IAM role access denied on S3

不羁的心 提交于 2019-12-04 10:50:37
I have launched an EC2 instance with IAM role "webapp". role is attached and i can confirm it using curl http://169.254.169.254/latest/meta-data/iam/security-credentials/webapp { "Code" : "Success", "LastUpdated" : "2016-01-04T06:44:50Z", "Type" : "AWS-HMAC", "AccessKeyId" : "xxx", "SecretAccessKey" : "xxx", "Token" : "xxx", "Expiration" : "2016-01-04T12:46:27Z" } webapp Role has an attached policy for S3 { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:*", "Resource": "*" } ] } But I am unable to access objects on S3. I am using aws-php-sdk require_once 'vendor

AWS Cognito SMS Role : Cannot create or assign a new role

南笙酒味 提交于 2019-12-04 10:41:06
I am not able to get verification codes(sms) and mobile app. i deleted the role. i tried recreating the role in cognito but it doesn't give any option to do so. Error response while i create new user : "Role does not have trust relationship allowing cognito to assume the role" On saving the verification settings on my cognito (with the previous role arn stuck in there) it say " Your roles are still being created " Error while saving verification changes I too faced the same issue. Let me share the method in which i solved it, Although not the optimal method, i think, but i hope it helps: 1) I

Login as IAM User using AWS SDK

会有一股神秘感。 提交于 2019-12-04 10:05:44
Can anyone help me on how to login as an IAM user using AWS SDK? I am using AWS SDK for Java and had been finding suitable APIs to login as an IAM User, which I am not able to. I am able to pass the access and secret keys to login using the SDK, but my use case is to validate the user and the password given by the IAM User I also wish there was secure way to to do this. But from all that I have read there isn't. The IAM username and password can only be used with the Amazon management console and their forums ( http://docs.aws.amazon.com/AWSSecurityCredentials/1.0/AboutAWSCredentials.html ) I

Setting up RDS (MySQL) database access using IAM to generate access tokens

拥有回忆 提交于 2019-12-04 09:50:01
I have followed the instructions to set up AWS and MySQL such that I should be able to sign in to mysql using mysql-client and a user (named aws_iam ) without a password, but with a token generated by awscli with the role attached to my EC2 instance. The instructions are here So what I have is: An EC2 instance with a role which allows me to generate RDS credentials An RDS instance running MySQL, with a user aws_iam which is identified by AWSAuthenticationPlugin When signed in to the EC2 instance via SSH I can run mysql -h mydb.randomstring.region.rds.amazonaws.com -u root -p and enter the