Note: Before starting the workshop, ensure that the region selected for the workshop supports EKS, CDK, Cloud9 services. Recommend using us-east-2 (Ohio) or us-west-2 (Oregon) for the Workshop.
Please carry out the following steps in order to run the workshop.
This example uses AWS Command Line Interface to be run in Terminal / Shell application on your local machine.
We recommend using AWS Cloud 9 service to setup your environment that comes pre-installed with AWS CLI packages, git and many other useful utilities along with inbuilt IDE functionalities. Once logged in, you can use this Browser based IDE for coding, bash shell to run the Linux commands. While creating the Cloud9 environment, ensure the hibernate settings are configured to 30 minutes or more.
Go through the default selection and wait for the environment to be created. This will launch an EC2 instance with your environment name and once fully up, you would get access to your environment and in turn bash shell. You have IDE capabilities built-in into this environment:
Cloud9 normally manages IAM credentials dynamically. This isn’t currently compatible with the EKS IAM authentication, so we recommend disabling it and rely on the IAM role instead.
If using Cloud9, please follow the steps as explained below to configure credentials to be used by Cloud9:
Create IAM role (eksworkshop-admin) with EC2 as trusted entity and Admin Rights
(a) First Go to Services -> IAM -> Roles -> Create Role as shown below: (b) Then on the next page, select AWS Service and EC2 as use-case as shown below: (c ) Select Permission Policy as AdministratorAccess as shown below and give the rolename as eksworkshop-admin:
Attach IAM role to the Cloud9 EC2 instance
(a) Go to Services -> EC2 -> Instances -> Locate the instance with your Cloud9 environment name as shown below: (b) Click Actions -> Attach/Replace IAM Role as shown below: (c ) Select the eksworkshop-admin role you created in the above step:
Access AWS Settings in Cloud9 and disable AWS managed temporary credentials
(a) Go to your Cloud9 environment and select the setting icon as shown below: (b) Select AWS Settings as shown below: (c ) Disable the Temporary Credentials option as shown below:
Now your environment is setup, move to the next steps of preparation.