IAM Policies for Poolside Deployment on AWS
This document outlines the IAM policies created as part of the Poolside self-managed deployment solution in AWS. These policies are designed to follow the principle of least privilege while enabling the necessary functionality for each component.EKS Pod Role
The EKS Pod role ([deployment-prefix]-eks-pod-role) is used by the Kubernetes pods running the Poolside application. This role enables the application to interact with AWS services securely.
S3 Access Policy
Component: Core application podsActions:
s3:ListBucket- Allows listing objects in the Poolside S3 buckets3:GetObject,s3:PutObject- Allows reading and writing objects in the Poolside S3 bucket
Purpose: Enables the application to store and retrieve user data and application assets
AWS Marketplace Metering Policy
Component: Core application podsActions:
aws-marketplace:MeterUsage- Allows reporting metering records to AWS Marketplace
*)Purpose: Enables usage-based billing for marketplace deployments
KMS Access Policy
Component: Core application podsActions:
kms:Decrypt- Allows decryption of encrypted datakms:GenerateDataKey- Allows generation of data encryption keyskms:GenerateDataKeyWithoutPlaintext- Allows generation of encrypted data keys
Purpose: Enables secure encryption/decryption of sensitive data
Bedrock Access Policies
Bedrock Read-Only Policy
Component: Core application podsActions:
bedrock:GetFoundationModel,bedrock:ListFoundationModels,bedrock:ListCustomModels- Allows discovery of available models
*)Purpose: Enables the application to discover available foundation and custom models
Bedrock Model Invocation Policy
Component: Core application podsActions:
bedrock:InvokeModel,bedrock:InvokeModelWithResponseStream- Allows invoking Bedrock models
Purpose: Enables the application to use Amazon Bedrock for AI inference
Bedrock Customization Job Policy
Component: Core application podsActions:
bedrock:CreateModelCustomizationJob,bedrock:GetModelCustomizationJob,bedrock:StopModelCustomizationJob- Allows management of model customization jobsiam:PassRole- Allows passing the customization job role
Bastion Host Policies
The bastion host is a secure EC2 instance used for deployment management and administrative tasks.ECR Access Policy
Component: Bastion hostActions: Comprehensive ECR permissions including:
ecr:PutImageTagMutability,ecr:GetDownloadUrlForLayer,ecr:ListTagsForResourceecr:UploadLayerPart,ecr:ListImages,ecr:PutImage,ecr:UntagResourceecr:BatchGetImage,ecr:CompleteLayerUpload,ecr:DescribeImagesecr:TagResource,ecr:DescribeRepositories,ecr:InitiateLayerUploadecr:DescribeRegistry,ecr:GetAuthorizationToken
poolside-[deployment-name]Purpose: Allows the bastion host to manage container images for deployment
Cognito Management Policy
Component: Bastion hostActions: Comprehensive Cognito management including:
- User pool creation, deletion, and modification
- User pool client configuration
- Domain management
- MFA configuration
*)Purpose: Enables management of user authentication services
SSM Parameter Store Management Policy
Component: Bastion hostActions:
ssm:PutParameter,ssm:DeleteParameter,ssm:GetParametersByPathssm:GetParameters,ssm:GetParameter,ssm:DeleteParameters
/poolside/deployment/*Purpose: Enables secure storage and retrieval of configuration parameters
ACM Read Policy
Component: Bastion hostActions:
acm:DescribeCertificate,acm:GetCertificateacm:ListCertificates,acm:ListTagsForCertificate
*)Purpose: Allows reading certificate information for HTTPS configuration
Terraform State Policy
Component: Bastion hostActions:
dynamodb:PutItem,dynamodb:GetItem,dynamodb:DeleteItem
*)Purpose: Enables locking and state management for Terraform operations
Bastion Host Default Policy
Component: Bastion hostActions: Extensive permissions for AWS resource management including EC2, IAM, S3, KMS, and more
Resources: All resources (
*)Purpose: Enables infrastructure management for deployment operations
Load Balancer Controller Policy
Component: AWS Load Balancer ControllerActions: Managed by AWS module
terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eksResources: Various AWS resources related to load balancing
Purpose: Enables the Kubernetes ingress controller to provision and manage AWS Application Load Balancers