Setting up the Development Environment
Objective
This guide shows you how to setup the development environment to for the workshop.
- At an AWS hosted event
- In your own AWS account (Cloud 9)
Overview
If you are attending an AWS hosted event, you will have access to an AWS account with any optional pre-provisioned infrastructure and IAM policies needed to complete this workshop. The goal of this section is to help you access this AWS account. You may skip this section if you plan to use your own AWS account.
Prerequisites
- Sign in via the one-click join event link provided by the event operator as part of an AWS hosted event.
- OR via the Workshop Studio join URL with the 12 digit event access code distributed by an event operator.
- Carefully review the terms and conditions associated with this event.
1. Accessing AWS Account
After joining the event, you should see the page with event information and workshop details. You should also see a section titled "AWS account access" on the left navigation bar. You can use these options to access the temporary AWS account provided to you.
The “Open AWS console” link will open the AWS Management Console home page. This is the standard AWS Console that provides access to each service. Please note that the infrastructure associated with the workshop will be deployed to a specific region and can be only accessed from that region.
In this workshop there will be a number of AWS resources created in your account. These resources will incur cost and will be billed to your AWS Account, make sure you delete all resources after the workshop to avoid unnecessary costs. Please refer to the cleanup section.
You can use the following setup to create a virtual development environment by using AWS Cloud9.
1. Deploying AWS CloudFormation template for Cloud9 instance and the workshop infrastructure
Go to the AWS CloudShell console directly, or navigate to AWS CloudShell in the AWS console.
If using the link above make sure the AWS console has opened in the region that you wish to run the labs in.
Deploy AWS CloudFormation template
curl https://raw.githubusercontent.com/aws-samples/java-on-aws/main/labs/unicorn-store/infrastructure/cfn/java-on-aws-workshop.yaml > java-on-aws-workshop.yaml
aws cloudformation deploy --stack-name java-on-aws-workshop \
--template-file ./java-on-aws-workshop.yaml \
--capabilities CAPABILITY_NAMED_IAM
Wait until the command finish successfully.
Go to the AWS CloudFormation console directly, or navigate to AWS CloudFormation in the AWS console.
Verify that the Stacks reached the CREATE_COMPLETE
status.
The creation of the stacks might take around 30 minutes.
2. Accessing AWS Cloud9 Instance
Go to the AWS Cloud 9 console directly, or navigate to Cloud9 in the AWS console:
Click on "Open" for the "java-on-aws-workshop" instance to connect to Cloud9 IDE:
When asked about "Working with Java?" - click "Activate" and refresh the entire browser page to activate the extension.
In case if you see Information: AWS Toolkit. "Connection expired. To continue using CodeWhisperer, connect with AWS Builder ID or AWS IAM Identity center.", click "Don't Show Again" and continue.
You have now successfully opened Cloud9 instance.
After opening the Cloud9 instance, you can find the workshop code in the left sidebar. You can close the welcome window and use the "New terminal" command to open the terminal window and execute the commands provided in the workshop.
AWS Cloud9 does not auto-save your files. Please ensure to save your files before deploying any changes via Ctrl+S or the top menu File→Save all.
Conclusion
Once you've verified access to the AWS account and AWS Cloud9 instance, you should have everything you need to get started with this workshop.