AWS Environment
The user account provisioned through the Katacoda environment will have access to an isolated account per user, defined under O’Reilly’s organizational unit. Note that the temporary user account is active for 60 minutes and is then deactivated. Please see the AWS Sandbox example (through direct link only) on learning.oreilly.com.
Lab Set-up
- Base imageID to configure in index.json:
"imageid": "orm-aws"
- index.json should be configured to auto-execute the set-env.sh script.
"intro": {
"text": "intro.md",
"courseData": "background.sh",
"code": "set-env.sh"
},
- The set-env.sh script should include:
chmod +x /opt/get-aws
for i in {1..20}; do /opt/get-aws && . ~/.awsenv && break || sleep 1; done
The /opt/get-aws
script will show the username, password, accessKeyId, secretAccessKey, and aws_account_id in the terminal output.
Pre-Installed Tools
- AWS CLI is pre-installed in the base image.
- AWS Copilot CLI
- AWS CDK Toolkit
- Python 3.11
- Terraform
- session-manager-plugin
- eksctl
Environment Variables
The environment includes AWS credentials in the file ~/.aws-resp
, and there is a helper script /opt/get-aws
that configures the following environment variables:
- username: IAM user name. Follows the pattern user-
. - password: User’s password.
- accessKeyId / AWS_ACCESS_KEY_ID: access key ID to make programmatic calls to AWS from the AWS CLI.
- secretAccessKey / AWS_SECRET_ACCESS_KEY: secret access key.
- console: URL containing account ID To sign in to an AWS account as an IAM user.
- region / AWS_DEFAULT_REGION / AWS_REGION: AWS region, default us-east-1.
- randomNum / sessionRandomNumber: a random string of 12 decimal digits. Useful for resources that need to be globally unique.
- aws_account_id / AWS_ACCOUNT_ID: AWS account ID
This helper script also configures aws_access_key_id and aws_secret_access_key in the file ~/.aws/credentials, and sets the default region in ~/.aws/config.
Services
For full service details on Supported Services, Resources, Actions, and Limitations, please refer to the AWS Service Details page.