-
Notifications
You must be signed in to change notification settings - Fork 0
AWS Setup
This step-by-step guide walks you through setting up Amazon Web Services to work with Displace. No prior AWS experience required.
Subscription Required: AWS provider access requires a paid Displace subscription. Local development is always free.
Note: AWS provider currently uses the AWS CLI. Future versions may migrate to Terraform for infrastructure management.
Before starting, you'll need:
- An email address for your AWS account
- A credit card for AWS account verification
- About 20-30 minutes to complete setup
To use Displace with AWS, you need:
- AWS Account - Your Amazon Web Services account
- IAM User - A special user account that Displace uses to manage resources
- Access Keys - Credentials that prove Displace is authorized to use that user
- AWS CLI - The command-line tool that connects to AWS
Don't worry - we'll walk through each step!
If you already have an AWS account, skip to Step 2.
-
Go to aws.amazon.com
-
Click Create an AWS Account (top right)
-
Enter your email address and choose an account name
-
Verify your email address
-
Create a root user password
-
Select Personal or Business account type
-
Enter your contact information
-
Enter payment information (required for verification)
-
Verify your phone number
-
Select a support plan (Free tier is fine for getting started)
What you should see: The AWS Management Console welcome page
Free Tier: New AWS accounts get 12 months of free tier access. EKS clusters themselves cost ~$0.10/hour, but you can use free tier for EC2 instances.
IAM (Identity and Access Management) users are more secure than using your root account. We'll create a dedicated user for Displace.
-
Sign in to the AWS Console
-
In the search bar at the top, type
IAMand click on IAM -
In the left sidebar, click Users
-
Click Create user (blue button)
-
Enter user details:
-
User name:
displace-cli - Provide user access to the AWS Management Console: Leave unchecked (not needed)
-
User name:
-
Click Next
What you should see: The "Set permissions" page appears
Displace needs specific permissions to manage EKS clusters. We'll create a custom policy with exactly what's needed.
You should still be on the user creation page. First, let's create the policy:
-
Open a new browser tab and go to the AWS Console
-
Search for
IAMand click on it -
In the left sidebar, click Policies
-
Click Create policy
-
Click the JSON tab
-
Delete the existing content and paste this policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"eks:ListClusters",
"eks:DescribeCluster",
"eks:CreateCluster",
"eks:DeleteCluster",
"eks:UpdateClusterConfig",
"eks:UpdateClusterVersion",
"eks:ListNodegroups",
"eks:CreateNodegroup",
"eks:DeleteNodegroup",
"eks:UpdateNodegroupConfig",
"eks:DescribeNodegroup",
"eks:ListUpdates",
"eks:DescribeUpdate",
"eks:ListFargateProfiles",
"eks:CreateFargateProfile",
"eks:DeleteFargateProfile",
"eks:DescribeFargateProfile",
"eks:TagResource",
"eks:UntagResource",
"eks:ListTagsForResource"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"iam:PassRole"
],
"Resource": [
"arn:aws:iam::*:role/eks-*",
"arn:aws:iam::*:role/AmazonEKS*"
]
},
{
"Effect": "Allow",
"Action": [
"iam:CreateServiceLinkedRole"
],
"Resource": "*",
"Condition": {
"StringEquals": {
"iam:AWSServiceName": [
"eks.amazonaws.com",
"eks-nodegroup.amazonaws.com"
]
}
}
},
{
"Effect": "Allow",
"Action": [
"iam:GetRole"
],
"Resource": "arn:aws:iam::*:role/aws-service-role/eks-nodegroup.amazonaws.com/AWSServiceRoleForAmazonEKSNodegroup"
},
{
"Effect": "Allow",
"Action": [
"ec2:DescribeVpcs",
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups",
"ec2:DescribeRouteTables",
"ec2:DescribeInternetGateways",
"ec2:DescribeNatGateways",
"ec2:DescribeVpcEndpoints",
"ec2:DescribeAvailabilityZones"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateVpc",
"ec2:CreateSubnet",
"ec2:CreateSecurityGroup",
"ec2:CreateRouteTable",
"ec2:CreateInternetGateway",
"ec2:CreateNatGateway",
"ec2:CreateVpcEndpoint",
"ec2:CreateTags",
"ec2:ModifyVpcAttribute",
"ec2:ModifySubnetAttribute",
"ec2:AuthorizeSecurityGroupIngress",
"ec2:AuthorizeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RevokeSecurityGroupEgress",
"ec2:CreateRoute",
"ec2:DeleteRoute",
"ec2:ReplaceRoute",
"ec2:AssociateRouteTable",
"ec2:DisassociateRouteTable",
"ec2:AttachInternetGateway",
"ec2:DetachInternetGateway"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:DeleteVpc",
"ec2:DeleteSubnet",
"ec2:DeleteSecurityGroup",
"ec2:DeleteRouteTable",
"ec2:DeleteInternetGateway",
"ec2:DeleteNatGateway"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateLaunchTemplate",
"ec2:CreateLaunchTemplateVersion",
"ec2:DescribeLaunchTemplates",
"ec2:DescribeLaunchTemplateVersions",
"ec2:DeleteLaunchTemplate",
"ec2:DeleteLaunchTemplateVersions"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:RunInstances",
"ec2:DescribeInstances",
"ec2:TerminateInstances",
"ec2:StartInstances",
"ec2:StopInstances"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:CreateKeyPair",
"ec2:DescribeKeyPairs",
"ec2:DeleteKeyPair"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"ec2:AllocateAddress",
"ec2:DescribeAddresses",
"ec2:ReleaseAddress"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"autoscaling:CreateAutoScalingGroup",
"autoscaling:DescribeAutoScalingGroups",
"autoscaling:UpdateAutoScalingGroup",
"autoscaling:DeleteAutoScalingGroup",
"autoscaling:CreateLaunchConfiguration",
"autoscaling:DescribeLaunchConfigurations",
"autoscaling:DeleteLaunchConfiguration"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"iam:CreateRole",
"iam:DeleteRole",
"iam:GetRole",
"iam:ListAttachedRolePolicies",
"iam:ListRolePolicies",
"iam:PutRolePolicy",
"iam:DeleteRolePolicy",
"iam:AttachRolePolicy",
"iam:DetachRolePolicy",
"iam:PassRole"
],
"Resource": [
"arn:aws:iam::*:role/eks-*",
"arn:aws:iam::*:role/AmazonEKSClusterRole",
"arn:aws:iam::*:role/AmazonEKSNodeRole"
]
}
]
}-
Click Next
-
Enter policy details:
-
Policy name:
DisplaceEKSPolicy -
Description:
IAM policy for Displace CLI to manage EKS clusters
-
Policy name:
-
Click Create policy
What you should see: "Policy DisplaceEKSPolicy created" message
Go back to the browser tab where you were creating the IAM user.
-
On the "Set permissions" page, click Attach policies directly
-
In the search box, type
DisplaceEKSPolicy -
Check the box next to your newly created policy
-
Click Next
-
Review the user details and click Create user
What you should see: "User created successfully" message
Access keys are like a username and password that Displace uses to authenticate.
-
Click on the user name
displace-clito open the user details -
Click the Security credentials tab
-
Scroll down to Access keys
-
Click Create access key
-
Select Command Line Interface (CLI)
-
Check the confirmation box at the bottom
-
Click Next
-
(Optional) Add a description tag like
Displace CLI access -
Click Create access key
-
IMPORTANT: You'll see your Access Key ID and Secret Access Key. Save these now!
- Click Download .csv file to save them
- Or copy them to a secure location
What you should see: Your Access Key ID and Secret Access Key displayed
Security Warning: This is the only time you'll see the Secret Access Key. If you lose it, you'll need to create a new one.
- Never share these keys publicly
- Never commit them to git
- Store them securely
The AWS CLI connects your computer to AWS. Displace uses it to manage your EKS clusters.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/installcurl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/installaws --versionWhat you should see: Something like aws-cli/2.x.x Python/3.x.x ...
Now we'll configure the AWS CLI with your access keys.
-
Run the configure command:
aws configure
-
Enter the requested information:
- AWS Access Key ID: Paste your Access Key ID from Step 5
- AWS Secret Access Key: Paste your Secret Access Key from Step 5
-
Default region name: Enter a region like
us-west-2orus-east-1 -
Default output format: Press Enter to accept default (or type
json)
What you should see: The prompt returns with no error
aws sts get-caller-identityWhat you should see:
{
"UserId": "AIDAEXAMPLEID123456",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/displace-cli"
}Now connect Displace to your AWS account.
displace provider aws configureWhen prompted:
-
AWS Region: Enter your preferred region (e.g.,
us-west-2) -
AWS Profile: Press Enter to use
default, or specify a profile name
What you should see:
✅ AWS provider configured successfully
Region: us-west-2
Profile: default
Verify everything is working:
# Test the provider connection
displace provider test awsWhat you should see:
✅ AWS provider test successful
- Credentials valid
- Permissions verified
You can also audit your configuration:
displace provider aws auditYou're ready to create a Kubernetes cluster!
# Create a cluster named "my-cluster"
displace cluster create my-cluster --provider awsThis will:
- Create a VPC with subnets
- Set up security groups
- Create an EKS cluster
- Configure node groups
- Configure kubectl to connect
- Install monitoring and ingress components
Wait time: EKS cluster creation takes 10-15 minutes.
What you should see:
Creating cluster 'my-cluster' on AWS...
✅ VPC created
✅ Subnets configured
✅ Security groups configured
✅ EKS cluster created
✅ Node group ready
✅ Kubectl configured
✅ Monitoring installed
✅ Ingress controller installed
Cluster 'my-cluster' is ready!
AWS charges for resources your cluster uses. Here's what to expect:
AWS Free Tier includes some EC2 hours, but EKS itself is not free:
- EKS cluster management: $0.10 per hour (~$72/month)
- EC2 instances: Varies by type (some free tier eligible)
| Resource | Approximate Cost |
|---|---|
| EKS cluster | $0.10/hour (~$72/month) |
| t3.medium node (2 vCPU, 4GB) | ~$30/month |
| t3.small node (2 vCPU, 2GB) | ~$15/month |
| EBS storage (20GB) | ~$2/month |
| Network load balancer | ~$18/month |
-
Destroy clusters when not in use:
displace cluster destroy my-cluster
-
Use smaller node types for development:
displace cluster create dev-cluster --provider aws --node-type t3.small
-
Reduce node count:
displace cluster create dev-cluster --provider aws --node-count 1
-
Use spot instances (for non-production):
- Significant cost savings (up to 90%)
- Instances may be interrupted
-
Set up billing alerts in AWS Console > Billing > Budgets
Cause: IAM user missing required permissions.
Solution:
- Go to IAM > Users > displace-cli
- Click Permissions tab
- Verify
DisplaceEKSPolicyis attached - If missing, click Add permissions > Attach policies directly
Cause: Access keys incorrect or expired.
Solution:
- Verify your
~/.aws/credentialsfile has the correct keys - Create new access keys if needed (Step 5)
- Run
aws configureagain
Cause: Some regions require manual opt-in.
Solution:
- Go to Account Settings in AWS Console
- Find the region and click Enable
- Wait a few minutes, then try again
Cause: AWS limits how many resources you can create.
Solution:
- Request a limit increase in AWS Console > Service Quotas
- Or try a different region
- Common limits: VPCs (5), Elastic IPs (5), EC2 instances (varies)
Cause: You've hit the maximum VPCs in a region (default: 5).
Solution:
- Delete unused VPCs in EC2 Console > VPC
- Or request a limit increase
Cause: EKS creation can take 15+ minutes.
Solution:
- Check status in AWS Console > EKS
- Look for error events
- Common issues: IAM role problems, subnet configuration
-
Never use root account for CLI
- Always use IAM users with limited permissions
- Enable MFA on your root account
-
Rotate access keys regularly
- Create new keys periodically
- Delete old keys after rotation
-
Use the principle of least privilege
- Only grant permissions that are needed
- Use the custom policy we provided
-
Protect your credentials
- Never commit
~/.aws/credentialsto git - Don't share access keys
- Consider AWS SSO for team access
- Never commit
-
Enable CloudTrail
- Track API calls for security auditing
- Go to CloudTrail in AWS Console
When you're done testing or want to remove resources:
displace cluster destroy my-cluster --provider aws- Go to IAM > Users > displace-cli
- Click Security credentials tab
- Find the access key and click Delete
- Go to IAM > Users
- Select
displace-cli - Click Delete user
- Type the user name to confirm
- Go to IAM > Policies
- Search for
DisplaceEKSPolicy - Select it and click Delete
Choose a region close to your users for better performance:
| Region Code | Location |
|---|---|
| us-east-1 | N. Virginia (most services) |
| us-east-2 | Ohio |
| us-west-1 | N. California |
| us-west-2 | Oregon |
| eu-west-1 | Ireland |
| eu-west-2 | London |
| eu-central-1 | Frankfurt |
| ap-southeast-1 | Singapore |
| ap-southeast-2 | Sydney |
| ap-northeast-1 | Tokyo |
# Configure AWS provider
displace provider aws configure
# Test configuration
displace provider test aws
# Audit configuration
displace provider aws audit
# View required IAM policy
displace provider aws policy
# Create cluster
displace cluster create my-cluster --provider aws
# Check cluster status
displace cluster status my-cluster --provider aws
# Destroy cluster
displace cluster destroy my-cluster --provider aws# Check credentials
aws sts get-caller-identity
# List EKS clusters
aws eks list-clusters --region us-west-2Related Documentation: