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 47 discussion

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

An application needs to use the IP address of the client in its processing. The application has been moved into AWS and has been placed behind an Application
Load Balancer (ALB). However, all the client IP addresses now appear to be the same. The application must maintain the ability to scale horizontally.
Based on this scenario, what is the MOST cost-effective solution to this problem?

  • A. Remove the application from the ALB. Delete the ALB and change Amazon Route 53 to direct traffic to the instance running the application.
  • B. Remove the application from the ALB. Create a Classic Load Balancer in its place. Direct traffic to the application using the HTTP protocol.
  • C. Alter the application code to inspect the X-Forwarded-For header. Ensure that the code can work properly if a list of IP addresses is passed in the header.
  • D. Alter the application code to inspect a custom header. Alter the client code to pass the IP address in the custom header.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
Bach999
Highly Voted 3 years, 6 months ago
https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/x-forwarded-headers.html#x-forwarded-for The X-Forwarded-For request header helps you identify the IP address of a client when you use an HTTP or HTTPS load balancer. Because load balancers intercept traffic between clients and servers, your server access logs contain only the IP address of the load balancer. To see the IP address of the client, use the X-Forwarded-For request header. Elastic Load Balancing stores the IP address of the client in the X-Forwarded-For request header and passes the header to your server.
upvoted 34 times
...
awscertified
Highly Voted 3 years, 7 months ago
C. Alter the application code to inspect the X-Forwarded-For header. Ensure that the code can work properly if a list of IP addresses is passed in the header.
upvoted 18 times
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: C
C) Correct - When an Application Load Balancer (ALB) is used, it typically proxies incoming requests to the backend application. The ALB adds a special HTTP header called X-Forwarded-For to the request. This header contains the original client IP address (or a list of IP addresses, if there are multiple proxies in between). By inspecting this header, the application can extract the original client IP address, even though the IP address that reaches the application is the IP of the ALB.
upvoted 1 times
sumanshu
4 months, 1 week ago
A) Eliminated - Removing the ALB reduces scalability and increases management overhead
upvoted 1 times
...
...
AsmaZoheb
1 year, 3 months ago
Selected Answer: C
yes C is the correct
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: C
The rigth answer is C, we can use X-Forwarded-For header to retrive the client IP. If we get the IP address directly from the request it will always be the same because the request comes from the ALB
upvoted 2 times
...
Dirisme
2 years, 3 months ago
Selected Answer: C
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/x-forwarded-headers.html
upvoted 1 times
...
dark_cherrymon
2 years, 5 months ago
Selected Answer: C
C easy
upvoted 2 times
...
ALQASSASS
2 years, 8 months ago
Selected Answer: C
The X-Forwarded-For request header helps you identify the IP address of a client
upvoted 3 times
...
MikeyJ
2 years, 11 months ago
Selected Answer: C
"The X-Forwarded-For (XFF) HTTP header field is a common method for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer." http://en.wikipedia.org/wiki/X-Forwarded-For
upvoted 1 times
...
leliodesouza
3 years, 4 months ago
Selected Answer: C
Answer: C
upvoted 2 times
...
VAG1595
3 years, 5 months ago
Answer: C
upvoted 3 times
...
wils3
3 years, 5 months ago
Ans :C
upvoted 3 times
...
Kelvin
3 years, 5 months ago
The answer is C.
upvoted 2 times
...
codeScalable
3 years, 6 months ago
definitely C
upvoted 2 times
...
saeidp
3 years, 6 months ago
C is correct
upvoted 2 times
...
svichkar
3 years, 6 months ago
https://aws.amazon.com/premiumsupport/knowledge-center/elb-capture-client-ip-addresses/ "For Application Load Balancers and Classic Load Balancers with HTTP/HTTPS listeners, you must use X-Forwarded-For headers to capture client IP addresses. "
upvoted 2 times
...
Scarback
3 years, 6 months ago
Resp: C
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago