A developer is implementing a backend service integration for automated partner applications. The partner applications must programmatically upload raw telemetry data directly to an Amazon S3 bucket. The partners authenticate using their own enterprise OpenID Connect (OIDC) identity provider. The developer must ensure that these external applications obtain temporary AWS credentials with permission to write only to a specific folder in the S3 bucket without requiring long-lived IAM user credentials. Which TWO configuration steps should the developer perform to meet these requirements?
- Create and configure an Amazon Cognito identity pool, specifying the partner's OIDC provider as an authentication provider.Answer
- Associate an IAM role containing the required folder-level S3 write permissions with the authenticated identity role of the Cognito identity pool.Answer
- CCreate an Amazon Cognito user pool, register the OIDC provider, and use user pool groups to grant direct access to the S3 bucket.
- DImplement an Amazon API Gateway Lambda authorizer that generates temporary IAM credentials using AWS STS and returns them in the context object.
- EGenerate long-lived IAM access keys for a partner service account and configure the partner applications to use these keys in their SDK calls.
Answer
Create and configure an Amazon Cognito identity pool with the external OIDC provider as an authentication provider, and associate an IAM role containing the required folder-level S3 write permissions with the authenticated identity role of the identity pool.
To access AWS resources directly from an external identity provider (such as an OIDC provider), Amazon Cognito identity pools are used to vend temporary AWS credentials. The client first authenticates with the OIDC provider, passes the token to the identity pool, and receives temporary AWS credentials mapped to an IAM role. This role must have a trust policy allowing the identity pool to assume it and an IAM policy with the necessary S3 folder permissions.
Step-by-Step Solution
Key Concept
Amazon Cognito Identity Pools (Federated Identities) for vending temporary AWS credentials to external OIDC-authenticated users.
Estimated Time:2m 0s