amazon-iam

Enabling AWS IAM Users access to shared bucket/objects

我的梦境 提交于 2019-12-06 13:42:05
Is it possible to expose Amazon S3 account bucket (shared by ACL setings) to the users setup using new Amazon AIM API under different account? I'm able to create working IAM policy when related to the users and objects belonging to a single account. But as it seems this no longer works when two different accounts are involved - despite account 2 being able to access account 1's bucket directly. Sample policy is: { "Statement": [ { "Effect": "Allow", "Action": [ "s3:*" ], "Resource": [ "arn:aws:s3:::test1234.doom", "arn:aws:s3:::test.doom" ], "Condition": {} } ] } In this case AIM user is able

Accessing AWS API Gateway from an EC2 using IAM authorization (NodeJS)

痞子三分冷 提交于 2019-12-06 09:23:38
Perhaps I'm going a bridge to far here but heres what I got: An AWS API Gateway Method that has AWS_IAM set for Authorization. A Policy that allows access to that Method. An EC2 Role that has that policy attached to it. An EC2 Launched with that Role. I would like to have my NodeJS program (or any language for that matter) on that EC2 to be able to call that API without hardcoding an AccessKey and SecretKey in the code. I have used this approach to use the aws-sdk to put/get records on S3, and do other AWS functionality (like all the steps I mentioned above), However, invoking an API Gateway

How to set up S3 Policies for multiple IAM users such that each individual only has access to their personal bucket folder?

人走茶凉 提交于 2019-12-06 08:59:35
I have two users User1 and User2 that each have an IAM account in AWS. I have an s3 bucket "external_bucket.frommycompany.com". In that bucket is a folder for each user account "User1" and "User2". I want to grant R/W access to User1 to the User1 folder only and R/W access to User2 to the User2 folder only. I don't want them to be able to see each others' folders in the root directory of external_bucket.frommycompany.com. Is there a way to set up their IAM Policies such that this is possible? My goal is to enable our users to connect to the S3 bucket from an S3 browser app like cloudberry so

DynamoDB fine-grained access control: is it possible to use ${cognito-identity.amazonaws.com:email}?

谁说我不能喝 提交于 2019-12-06 07:52:54
问题 My users have Cognito accounts. According to this article we can restrict access to the DynamoDB API with policy like that: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:Query" ], "Resource": [ "arn:aws:dynamodb: <REGION>:<AWS_ACCOUNT_ID>:table/<TABLE>" ], "Condition": { "ForAllValues:StringEquals": { "dynamodb:LeadingKeys": [ "${cognito-identity.amazonaws.com:sub}" ] } } } ] } Looks pretty straightforward for my

Amazon API Gateway IAM authenticated example with generated JS SDK

吃可爱长大的小学妹 提交于 2019-12-06 07:33:53
问题 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:

Amazon API Gateway User keys

此生再无相见时 提交于 2019-12-06 06:34:39
I have an API deployed on AWS API Gateway. I will have multiple subscribers using my API and each customer would be unique. Is it possible that each customer will have a separate API key unique to him? Or will I have to create those many IAM users in order for them to be unique? If yes for the IAM users, then what is the upper limit of the number of users? I will be doing all this programmatically. By unique, if you mean that you should be able to identify which request came from who, then you can generate one API Key per subscriber. You can generate up to 10000 API keys per AWS account. More

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

人盡茶涼 提交于 2019-12-06 05:50:59
问题 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

Login as IAM User using AWS SDK

。_饼干妹妹 提交于 2019-12-06 05:37:41
问题 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 回答1: 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

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

▼魔方 西西 提交于 2019-12-06 05:06:31
问题 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 回答1: I too faced the same issue. Let me

Explicit deny for user to runinstances in AWS when not using specific tag KeyValue

不羁的心 提交于 2019-12-06 04:15:03
I have created a policy which allows users to do all ec2 actions but restricts user to runinstances and createvolumes and terminate instances only when they pass the given tag key-values pairs with a explicit deny. ec2 full permissions policy { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "ec2:*", "Resource": "*" } ] } ec2 run instance and create volumes explicit deny with conditions. { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Deny", "Action": [ "ec2:RunInstances", "ec2:CreateVolume" ], "Resource": [ "arn:aws