A company is setting up an automated deployment pipeline. A third-party CI/CD platform hosted outside of AWS needs to deploy infrastructure changes to the company's AWS account. The company's security policy prohibits the use of long-term credentials for external integrations. Which combination of actions should a solutions architect perform to grant the CI/CD platform access to the AWS account? (Select TWO.)
- Configure an OpenID Connect (OIDC) identity provider in IAM that trusts the external CI/CD provider as the issuer.Answer
- BCreate an IAM user with programmatic access keys, store these credentials in the CI/CD service's secrets settings, and write an AWS Lambda function to rotate the keys daily.
- CCreate an IAM user for the CI/CD pipeline, and save the access key ID and secret access key as standard String parameters in AWS Systems Manager Parameter Store to allow external retrieval.
- Create an IAM role with a trust policy that allows the external CI/CD provider's OIDC identity provider to assume the role using the sts:AssumeRoleWithWebIdentity action.Answer
- EGenerate access keys for the AWS account root user and store them in the external CI/CD platform's repository secrets to ensure administrative deployment privileges.
Answer
To grant secure access without long-term credentials, configure an OpenID Connect (OIDC) identity provider in IAM that trusts the external CI/CD provider as the issuer, and create an IAM role with a trust policy that allows the external OIDC provider to assume the role using the sts:AssumeRoleWithWebIdentity action.
To grant secure access without long-term credentials, the architect should use OpenID Connect (OIDC) identity federation. First, configuring an OpenID Connect (OIDC) identity provider in IAM establishes a trust relationship between AWS and the external CI/CD platform. Second, creating an IAM role with a trust policy that allows the external OIDC provider to assume the role using the sts:AssumeRoleWithWebIdentity action enables the CI/CD pipeline to exchange OIDC tokens for short-lived, temporary AWS credentials.
Step-by-Step Solution
Key Concept
OpenID Connect (OIDC) Federation for temporary AWS credentials