amazon-iam

Connecting to Amazon Aurora with AWS IAM DB authentication

巧了我就是萌 提交于 2019-12-11 12:58:50
问题 I know that with Amazon Aurora MySQL, we can authenticate to the DB instance or DB cluster using AWS IAM database authentication. I followed the instructions here and It is working as instructed. However, this solution still needs the AWS credentials to be stored on the EC2 instance. I thought the whole purpose of this is to use the IAM roles to manage temporary credentials for applications running on an EC2 instance, so that we do not have to distribute long-term credentials (such as a user

AWS IAM - Allow user create roles only for services assume

断了今生、忘了曾经 提交于 2019-12-11 10:24:44
问题 I'm working on an application and I'm struggling about an issue. My application has Lambdas and DynamoDBs services in which the former needs permissions to call the latter. I solve this creating a role with Principal equals Service: lambda.amazonaws.com . I'd like to give access to other developers to create roles too in a way which allows developers to create only roles whose principal is a service or federated and deny if it is user or account. For example, this role would be allowed: Type:

Could not get the syntax of policy definition in SAM template resource(serverless function)

会有一股神秘感。 提交于 2019-12-11 09:47:49
问题 Policy definition of AWS managed policy ( AWSLambdaExecute ) is: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:*" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject" ], "Resource": "arn:aws:s3:::*" } ] } But the AWS_documentation gives a sample serverless function using the same policy name AWSLambdaExecute , as shown below: Type: AWS::Serverless::Function Properties: Handler: index.js Runtime: nodejs8.10

Should I use EC2 or Elastic Beanstalk when I am creating a new role where my EC2 / Beanstalk instances should have access to S3?

元气小坏坏 提交于 2019-12-11 09:05:39
问题 This link says To create the IAM role Open the IAM console. In the navigation pane, select Roles, then Create New Role. Enter a name for the role, then select Next Step. Remember this name, since you'll need it when you launch your Amazon EC2 instance. On the Select Role Type page, under AWS Service Roles, select Amazon EC2. On the Set Permissions page, under Select Policy Template, select Amazon S3 Read Only Access, then Next Step. On the Review page, select Create Role. But when you click

Does an EC2 instance hosting a web app require any role ( like s3fullaccess) even when the S3 resouce is public?

限于喜欢 提交于 2019-12-11 07:47:32
问题 Scenario : A web app is hosted on EC2 with a role having full S3 access. Now on the webapp, say the S3 resource is an image embedded as a link in some webpage. So here CORS comes in to action. So if CORS and Public access for the resource are enabled (for the Bucket I mean), that should do. And when public access is already granted, what's the point in adding a role to EC2 instance, the resource is already public. So, is not the role for EC2 instance redundant and not necessary. Could someone

AWS RDS MySQL connection using IAM Role is not working

£可爱£侵袭症+ 提交于 2019-12-11 05:18:46
问题 Would like to inform upfront that I am new to AWS in general. For my project I am trying to use AWS RDS MySQL using IAM Authentication (IAM Role) from a Java application deployed on Tomcat on an EC2 instance. Before trying it from Java I am trying it from the command prompt on the EC2 instance. I am following this link to do it: https://aws.amazon.com/premiumsupport/knowledge-center/users-connect-rds-iam/ I have done the following so far (please pardon if I am not using correct terminologies)

IAM policy to allow EC2 instance API access only to modify itself

一笑奈何 提交于 2019-12-11 04:27:35
问题 I'm trying to set up an app that configures my instances upon launch and I want to close down that app's API access as much as possible. My current policy is as follows: { "Version": "2012-10-17", "Statement": [ { "Sid": "Stmt1388183890000", "Effect": "Allow", "Action": [ "ec2:AssociateAddress", "ec2:CreateTags", "ec2:DescribeInstances", "ec2:RebootInstances" ], "Resource":"*" } ] } However, this allows the app to perform any of these actions on anything in EC2. Is there a way I can lock down

Get Amazon Access Key & Secret Key from IAM Username in Java

这一生的挚爱 提交于 2019-12-11 02:52:40
问题 I came across Get Username from Amazon Access Key in Java when searching for a solution for a problem I have. But the only difference is I want to achieve the exact opposite: Is it possible to get the access key & secret key to perform Java SDK operations by using the username created in IAM? I want to build an application when the user logs in with his IAM credentials he can start and stop instances in the application. But to do that I need the access & secret key of that user. I hope

Forbidden Exception on accessing AWS Iot using Amazon Cognito

雨燕双飞 提交于 2019-12-11 02:10:17
问题 I am creating an android application which connects to AWS IoT using Amazon Cognito authentication. I am able to authenticate user successfully and I am able get the credentials. While updating the thing shadow using these credentials always return 403 Forbidden Exception. I have tried all my ways to troubleshoot the issue but I found no solutions. My IAM Policy is: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iot:GetThingShadow", "iot:UpdateThingShadow", ],

How to attach IAM roles to EC2 instances so they can pull an specific image from ECR in Terraform

我的未来我决定 提交于 2019-12-11 01:55:30
问题 I'm trying to attach an IAM roles to EC2 instances (not ECS) so they can pull images from ECR. 回答1: Do something like this. Note you may want to limit which ECR repos are accessible. resource "aws_instance" "test" { ... } resource "aws_launch_configuration" "ecs_cluster" { ... iam_instance_profile = "${aws_iam_instance_profile.test.id}" } resource "aws_iam_role" "test" { name = "test_role" assume_role_policy = "..." } resource "aws_iam_instance_profile" "test" { name = "ec2-instance-profile"