amazon-iam

How to download an EC2 X.509 certificate with an IAM User account?

北战南征 提交于 2019-11-30 04:13:57
问题 Through the AWS Identity and Access Management, I have a user account to the AWS account of my CTO (who is credited with some money). I wanted to use this IAM user account to set up my own instances to ssh to it and run some BeautifulSoup python scripts. However, following this tutorial, when arriving to the part where I need to go on the Security Credentials page, I can't access this page and I'm told I do not have the authorization to view it. I checked my permissions with the IAM Manager,

When do I need to have CAPABILITY_NAMED_IAM

守給你的承諾、 提交于 2019-11-30 03:58:37
问题 I was editing my CloudFormation templates and suddenly AWS tells me I need CAPABILITY_NAMED_IAM . I am curious as to which change triggers this? What is a named IAM resource? Before I already "name" my resources like RoleName: !Sub '${PipelineName}-codebuild' I am not asked to add this capability, I think until I add Parameters: AppName: Type: String Description: Prefix for resources Resources: LambdaRole: Type: AWS::IAM::Role Properties: RoleName: !Ref AppName To my SAM application template.

Cross account role for an AWS Lambda function

怎甘沉沦 提交于 2019-11-30 01:13:50
问题 I have two AWS account (A and B). On my account A, I have a lambda function which need to access to resources of account B. Precisely, my lambda on my account A, need to update a record in a Route53 zone hosted on my account B. Contrary to S3, I don't see any resource access policy in Route53. So I'm a bit lost. I tried to play with IAM cross account roles, but that does not seems to work with lambda. How can I allow a lambda function on an account A to access resources of my account B? 回答1:

How to convert a private key to an RSA private key?

无人久伴 提交于 2019-11-29 19:01:07
Let me explain my question first. I bought a certificate from a CA and used the following format to generate the csr and the private key: openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr When I open the server.key file, I see that it begins with "-----BEGIN PRIVATE KEY-----" I use the SSL cert on my server and everything looks fine. Now I want to upload the same cert to AWS IAM so that I can use it for by beanstalk load balancer. I use the following command from this aws doc http://docs.aws.amazon.com/IAM/latest/UserGuide/InstallCert.html#SubmitCSRCertAuth iam

How to obtain userId specified by Alexa user during account linking

假装没事ソ 提交于 2019-11-29 18:04:34
During account linking process, Alexa user is redirected and presented with a form to enter his credentials (ID and/or password). Based on what's provided, the user is then being validated by the authentication flow, upon which success an accessToken is embedded in Alexa request and the user is redirected to the OAuth resource. Is there a way to pass the ID of the user obtained in the above interaction as part of the Alexa request (JSON session\user\userId ), instead of (or in addition to) it being a userId that gets generated during user's enabling their skill on a device? Or can the userId

AWS Trust Policy Has prohibited field Principal

巧了我就是萌 提交于 2019-11-29 13:28:47
I'm trying to create an IAM role and assign it to an EC2 instance according to Attach an AWS IAM Role to an Existing Amazon EC2 Instance by Using the AWS CLI . The policy looks like below: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } But it gives this error: This policy contains the following error: Has prohibited field Principal There is a similar question here but it couldn't fix this issue. Any help would be appreciated. The easiest way to create a Service Role is: Go to the IAM Console Click

AWS create role - Has prohibited field

自古美人都是妖i 提交于 2019-11-29 11:07:08
问题 I am trying out a simple example suggested by AWS documentation to create a role using a policy json file http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-service.html And I get the error A client error (MalformedPolicyDocument) occurred when calling the CreateRole operation: Has prohibited field Resource Here's the command, >> aws iam create-role --role-name test-service-role --assume-role-policy-document file:///home/ec2-user/policy.json A client error

Which user launched EC2 instance?

痞子三分冷 提交于 2019-11-29 06:31:34
I have some EC2 instances that I don't really know who launched them. Is there a way to know who launched a specific instance? Unfortunately this information is not directly available via an API call - you currently have two options: depending on your needs, you could approximate your goal by using the DescribeInstances API action to look at the key-name used for starting that instance (if any, it's optional, though usually in place) - assuming you have followed security best practices and are using a dedicated EC2 key pair per IAM user (rather than sharing keys), the key should usually denote

Logs for actions on amazon s3 / other AWS services

被刻印的时光 ゝ 提交于 2019-11-29 05:47:14
I am trying to see which user was responsible for changes in S3 (at buckets level). I could not find a audit trail for actions done at S3 bucket level or EC2 who created instances. Beanstalk has a log of the actions the machine performed, but not which user. Is there a way around AWS that we can see this information in IAM or any other location ? P.S: I am not interested to know about S3 log buckets which provide access logs Update AWS has just announced AWS CloudTrail , finally making auditing API calls available as of today (and for free), see the introductory post AWS CloudTrail - Capture

AWS IAM Policies to connect AWS Cloudwatch Logs, Kinesis Firehose, S3 and ElasticSearch

北战南征 提交于 2019-11-29 03:29:31
问题 I am trying to stream the AWS cloudwatch logs to ES via Kinesis Firehose. Below terraform code is giving an error. Any suggestions.. The error is: aws_cloudwatch_log_subscription_filter.test_kinesis_logfilter: 1 error(s) occurred: aws_cloudwatch_log_subscription_filter.test_kinesis_logfilter: InvalidParameterException: Could not deliver test message to specified Firehose stream. Check if the given Firehose stream is in ACTIVE state. resource "aws_s3_bucket" "bucket" { bucket = "cw-kinesis-es