Skip to content

AWS Deployment

DeepIntShield Enterprise images for AWS customers are distributed through AWS ECR, enabling native IAM integration for secure, credential-less authentication.

flowchart LR
subgraph AWS[AWS Account]
subgraph EKS[EKS Cluster]
Pod[DeepIntShield Pod]
KSA[K8s ServiceAccount]
end
IAMRole[IAM Role]
ECR[AWS ECR<br/>DeepIntShield Images]
end
KSA -->|Annotated with| IAMRole
Pod -->|Assumes| IAMRole
IAMRole -->|Pull Permission| ECR
ECR -->|Image| Pod
  • EKS cluster (v1.23+) or ECS cluster
  • AWS CLI configured with appropriate permissions
  • kubectl configured for your EKS cluster
  • Your AWS Account ID allowlisted by DeepIntShield team

IAM Roles for Service Accounts (IRSA) provides the most secure authentication method for EKS deployments.

Create an IAM policy that grants ECR pull access to the DeepIntShield repository.

{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "ECRAuth",
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken"
],
"Resource": "*"
},
{
"Sid": "ECRPullFromDeepIntShield",
"Effect": "Allow",
"Action": [
"ecr:BatchGetImage",
"ecr:GetDownloadUrlForLayer",
"ecr:BatchCheckLayerAvailability"
],
"Resource": "arn:aws:ecr:us-east-1:DEEPINTSHIELD_ACCOUNT_ID:repository/YOUR_HUB_SLUG"
}
]
}

Save this policy as deepintshield-ecr-pull-policy.json and create it:

Terminal window
aws iam create-policy \
--policy-name DeepIntShieldECRPullPolicy \
--policy-document file://deepintshield-ecr-pull-policy.json

Create an IAM role that can be assumed by your Kubernetes ServiceAccount.

First, get your OIDC provider URL:

Terminal window
aws eks describe-cluster \
--name YOUR_CLUSTER_NAME \
--query "cluster.identity.oidc.issuer" \
--output text

Create the trust policy (trust-policy.json):

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Federated": "arn:aws:iam::YOUR_ACCOUNT_ID:oidc-provider/oidc.eks.REGION.amazonaws.com/id/OIDC_ID"
},
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"oidc.eks.REGION.amazonaws.com/id/OIDC_ID:aud": "sts.amazonaws.com",
"oidc.eks.REGION.amazonaws.com/id/OIDC_ID:sub": "system:serviceaccount:NAMESPACE:deepintshield-sa"
}
}
}
]
}

Create the role and attach the policy:

Terminal window
# Create the role
aws iam create-role \
--role-name DeepIntShieldECRPullRole \
--assume-role-policy-document file://trust-policy.json
# Attach the policy
aws iam attach-role-policy \
--role-name DeepIntShieldECRPullRole \
--policy-arn arn:aws:iam::YOUR_ACCOUNT_ID:policy/DeepIntShieldECRPullPolicy

Send your IAM role ARN to the DeepIntShield team for allowlisting:

arn:aws:iam::YOUR_ACCOUNT_ID:role/DeepIntShieldECRPullRole

Step 4: Create Namespace and ServiceAccount

Section titled “Step 4: Create Namespace and ServiceAccount”
Terminal window
kubectl create namespace deepintshield
apiVersion: v1
kind: ServiceAccount
metadata:
name: deepintshield-sa
namespace: deepintshield
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::YOUR_ACCOUNT_ID:role/DeepIntShieldECRPullRole
apiVersion: apps/v1
kind: Deployment
metadata:
name: deepintshield
namespace: deepintshield
spec:
replicas: 2
selector:
matchLabels:
app: deepintshield
template:
metadata:
labels:
app: deepintshield
spec:
serviceAccountName: deepintshield-sa
containers:
- name: deepintshield
image: DEEPINTSHIELD_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/YOUR_HUB_SLUG:latest
ports:
- containerPort: 8080
name: http
resources:
requests:
cpu: "250m"
memory: "512Mi"
limits:
cpu: "1000m"
memory: "2Gi"
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
volumeMounts:
- name: config
mountPath: /app/data/config.json
subPath: config.json
volumes:
- name: config
secret:
secretName: deepintshield-config
---
apiVersion: v1
kind: Service
metadata:
name: deepintshield
namespace: deepintshield
spec:
selector:
app: deepintshield
ports:
- port: 80
targetPort: 8080
protocol: TCP
type: ClusterIP

For ECS deployments, use IAM Task Roles for authentication.

The task execution role allows ECS to pull images from ECR.

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ecr:GetAuthorizationToken"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ecr:BatchCheckLayerAvailability",
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage"
],
"Resource": "arn:aws:ecr:us-east-1:DEEPINTSHIELD_ACCOUNT_ID:repository/YOUR_HUB_SLUG"
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "*"
}
]
}
{
"family": "deepintshield",
"networkMode": "awsvpc",
"requiresCompatibilities": ["FARGATE"],
"cpu": "512",
"memory": "1024",
"executionRoleArn": "arn:aws:iam::YOUR_ACCOUNT_ID:role/DeepIntShieldECSExecutionRole",
"containerDefinitions": [
{
"name": "deepintshield",
"image": "DEEPINTSHIELD_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/YOUR_HUB_SLUG:latest",
"portMappings": [
{
"containerPort": 8080,
"protocol": "tcp"
}
],
"healthCheck": {
"command": ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"],
"interval": 30,
"timeout": 5,
"retries": 3,
"startPeriod": 60
},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/deepintshield",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "deepintshield"
}
}
}
]
}
Terminal window
aws ecs create-service \
--cluster your-cluster \
--service-name deepintshield \
--task-definition deepintshield \
--desired-count 2 \
--launch-type FARGATE \
--network-configuration "awsvpcConfiguration={subnets=[subnet-xxx],securityGroups=[sg-xxx],assignPublicIp=ENABLED}"
Terminal window
# Get ECR login token
aws ecr get-login-password --region us-east-1 | \
docker login --username AWS --password-stdin \
DEEPINTSHIELD_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com
# Pull test
docker pull DEEPINTSHIELD_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/YOUR_HUB_SLUG:latest
Terminal window
# Check ServiceAccount annotation
kubectl get sa deepintshield-sa -n deepintshield -o yaml
# Verify pod can assume role
kubectl exec -it deployment/deepintshield -n deepintshield -- \
aws sts get-caller-identity
  1. Check IAM Role trust policy: Ensure the OIDC provider and ServiceAccount match
  2. Verify ECR permissions: Confirm the role has ecr:BatchGetImage permission
  3. Check allowlisting: Ensure your role ARN is allowlisted by DeepIntShield team
Terminal window
# Check pod events
kubectl describe pod -l app=deepintshield -n deepintshield
# Check IRSA token
kubectl exec -it deployment/deepintshield -n deepintshield -- \
cat /var/run/secrets/eks.amazonaws.com/serviceaccount/token
Terminal window
# Verify OIDC provider is configured
aws iam list-open-id-connect-providers
# Check role assumption
aws sts assume-role-with-web-identity \
--role-arn arn:aws:iam::YOUR_ACCOUNT_ID:role/DeepIntShieldECRPullRole \
--role-session-name test \
--web-identity-token file:///path/to/token