exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 201 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 201
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer is deploying an application on Amazon EC2 instances that run in Account A. The application needs to read data from an existing Amazon Kinesis data stream in Account B.

Which actions should the developer take to provide the application with access to the stream? (Choose two.)

  • A. Update the instance profile role in Account A with stream read permissions.
  • B. Create an IAM role with stream read permissions in Account B.
  • C. Add a trust policy to the instance profile role and IAM role in Account B to allow the instance profile role to assume the IAM role.
  • D. Add a trust policy to the instance profile role and IAM role in Account B to allow reads from the stream.
  • E. Add a resource-based policy in Account B to allow read access from the instance profile role.
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
perfmon
1 year, 4 months ago
the relevant documentation links: - [Creating IAM Roles]https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html - [Tutorial: Delegate Access Across AWS Accounts Using IAM Roles]https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html
upvoted 1 times
...
perfmon
1 year, 4 months ago
D. - This option implies allowing direct read access from the instance profile role in Account A to the Kinesis data stream in Account B. - Directly granting read access to resources in another account without role assumption is generally not recommended due to security and governance concerns. - It bypasses the principle of least privilege and complicates access management. E. - This option involves creating a resource-based policy directly on the Kinesis data stream in Account B. - The policy specifies which entities (in this case, the instance profile role) are allowed to access the resource (Kinesis data stream). - While feasible, this option is less commonly used and can be more complex to manage compared to using IAM roles with cross-account trust relationships. - It's generally recommended to use IAM roles with trust relationships for cross-account access management instead of resource-based policies.
upvoted 1 times
...
perfmon
1 year, 4 months ago
A. - This option involves granting the necessary permissions directly to the instance profile role in Account A. - It's not recommended to grant cross-account access directly to instance profile roles because it violates the principle of least privilege and can lead to security risks. - Instance profile roles are typically meant for granting permissions to resources within the same AWS account. - This option is not appropriate for cross-account access scenarios like accessing resources in Account B from resources in Account A.
upvoted 1 times
...
AsmaZoheb
1 year, 5 months ago
Selected Answer: AE
For me A and E
upvoted 1 times
...
xdkonorek2
1 year, 6 months ago
Selected Answer: AE
I vote for AE 1. you cannot assume cross-account iam role directly it must reside in same aws account so options C and D are out 2. You can attach resource based policy to a stream https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html#kinesis-using-iam-examples
upvoted 3 times
...
MrTee
2 years, 2 months ago
To provide the application with access to the stream, the developer should update the instance profile role in Account A with stream read permissions (option A) and add a resource-based policy in Account B to allow read access from the instance profile role (option E). This will allow the application running on the EC2 instances in Account A to assume the instance profile role and read data from the Kinesis data stream in Account B.
upvoted 4 times
...
Syre
2 years, 2 months ago
Selected Answer: AC
Option B is incorrect because it creates an IAM role in the wrong account.
upvoted 1 times
ninomfr64
1 year, 10 months ago
B) You create a role in account B with the required permission and then allow the Instance profile in account A to assume role in account B. this looks valid to me
upvoted 2 times
...
...
shahs10
2 years, 3 months ago
Selected Answer: AE
Based on https://docs.aws.amazon.com/kinesisanalytics/latest/java/examples-cross.html
upvoted 1 times
ninomfr64
1 year, 10 months ago
E assumes you can assign resource policy to a KDS Stream, which is not supported https://docs.aws.amazon.com/streams/latest/dev/controlling-access.html
upvoted 2 times
...
...
Jay1299
2 years, 3 months ago
Its AC
upvoted 3 times
...
Krt5894
2 years, 4 months ago
Selected Answer: BC
B and C
upvoted 3 times
...
svvaghela
2 years, 4 months ago
Answer should be B and D. Read the document of trust policy https://aws.amazon.com/blogs/security/how-to-use-trust-policies-with-iam-roles/
upvoted 1 times
captainpike
2 years, 3 months ago
IMO, you are voting for B&D but the links confirms B&C
upvoted 1 times
...
...
gaddour_med
2 years, 5 months ago
Selected Answer: BC
For some AWS services, you can grant cross-account access to your resources. To do this, you attach a policy directly to the resource that you want to share, instead of using a role as a proxy. The resource that you want to share must support resource-based policies. Unlike an identity-based policy, a resource-based policy specifies who (which principal) can access that resource. The following list includes some of the AWS services that support resource-based policies. Amazon S3 buckets Amazon Simple Notification Service (Amazon SNS) topics Amazon Simple Queue Service (Amazon SQS) queues
upvoted 1 times
...
gaddour_med
2 years, 5 months ago
Selected Answer: AE
Why not A&E ???
upvoted 2 times
...
Phinx
2 years, 5 months ago
Selected Answer: BC
It's B,C for me. https://aws.amazon.com/blogs/architecture/field-notes-how-to-enable-cross-account-access-for-amazon-kinesis-data-streams-using-kinesis-client-library-2-x/
upvoted 3 times
MukthaBa
2 years, 5 months ago
Looks like option 'B' should be IAM role for Account A. Option 'C' has IAM role for Account B already. Then B and C will be perfect answer. I don't find any of the two choices are matching here in this question. A and C are little close enough because says instance profile role not IAM role per se.
upvoted 2 times
...
...
Mom305
2 years, 5 months ago
Selected Answer: BC
According to this Article, Create an IAM Role to Access (Read) in the Kinesis Stream Account. Add a trust policy to the EC2 instances Account, and the Kinesis Stream Account to allow the EC2 instances assume the role to read from the stream. Hence B and C
upvoted 1 times
Mom305
2 years, 5 months ago
Here's the article provided by "k1kavi1" https://aws.amazon.com/blogs/architecture/field-notes-how-to-enable-cross-account-access-for-amazon-kinesis-data-streams-using-kinesis-client-library-2-x/
upvoted 1 times
...
...
Duded12121
2 years, 5 months ago
Selected Answer: AE
https://www.youtube.com/watch?v=Ob1zYHjqNwo&ab_channel=FelixYu
upvoted 1 times
...
Mark1000
2 years, 6 months ago
In my opinion B and C too Role in B Account to allow read from Kinesis and in trust policy AssumeRole for Account A
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...