A smart agriculture company is developing a system where IoT field sensors and farm managers access backend microservices through an Amazon API Gateway REST API. The field sensors must securely publish telemetry data at regular intervals using IAM roles, while the farm managers must log in using an email and password to view and control irrigation systems through a web interface. The developer needs to secure both endpoints with the least administrative overhead. Which TWO actions should the developer take to configure the API Gateway security? (Select TWO.)
- Configure the telemetry endpoint to use AWS_IAM authorization, requiring the sensors to sign their HTTPS requests using Signature Version 4 (SigV4).Answer
- Configure the management endpoint to use an Amazon Cognito User Pools authorizer to authenticate and validate the JSON Web Tokens (JWTs) of the farm managers.Answer
- CConfigure the management endpoint to use an Amazon Cognito Identity Pools authorizer to directly authenticate the credentials of the farm managers.
- DCreate a custom Lambda authorizer for the management endpoint to decode, verify, and validate the Cognito User Pool JWTs manually.
- EEnable API Gateway Lambda proxy integration on the telemetry endpoint to automatically authenticate the sensor IAM roles.
Answer
To secure the REST API with the least administrative overhead, configure the telemetry endpoint to use AWS_IAM authorization, allowing sensors to sign their requests using Signature Version 4, and configure the management endpoint to use a Cognito User Pools authorizer to validate the JWTs of authenticated farm managers.
For IoT sensors configured with IAM roles, API Gateway's native AWS_IAM authorization validates calls signed with Signature Version 4 (SigV4) securely. For farm managers authenticating with a username and password, Cognito User Pools manage the user identities and generate JWTs, which API Gateway's native Cognito User Pools authorizer validates automatically without code.
Step-by-Step Solution
Key Concept
API Gateway authorization types (IAM authorization vs Cognito User Pools authorizers vs custom Lambda authorizers)
Estimated Time:2m 0s