The pod_identity_agent_enable
parameter enables the AWS Pod Identity Agent. This allows Kubernetes pods to assume IAM roles, providing fine-grained access control for accessing AWS services.
The default value for pod_identity_agent_enable
is false
.
To enable the AWS Pod Identity Agent, use the following command:
$ convox rack params set pod_identity_agent_enable=true -r rackName
Setting parameters... OK
This command enables the AWS Pod Identity Agent for your rack.
Enabling the AWS Pod Identity Agent allows your applications running in Kubernetes to securely access AWS services by assuming IAM roles. This setup reduces the need for static AWS credentials within your application code. Ensure that you have configured IAM roles and Kubernetes service accounts properly to take full advantage of this feature.
Enable the EKS pod identity feature by executing:
convox rack params set pod_identity_agent_enable=true -r rackName
Update your convox.yml
to include the required AWS IAM policy ARNs:
services:
web:
build: .
port: 3000
accessControl:
awsPodIdentity:
policyArns:
- "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryReadOnly"
- "arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess"
- "arn:aws:iam::123456789012:policy/MyCustomPolicy"
Deploy your application changes using:
convox deploy -a appName -r rackName
By enabling this parameter, you enhance the security and manageability of your application’s access to AWS resources.