- IAM Role
LFXCDK-SSMRoleForInstancesDefault
is made by hand in the Web Console first with the following Amazon Policies:AmazonEC2FullAccess
AmazonSSMManagedInstanceCore
CloudWatchAgentServerPolicy
- this allows instances to be managed by the Systems Manager [SSM]
- set up the appropriate AWS account credentials and configuration
- Set these environment variables
export AWS_PROFILE=aventinesolutions
export CDK_DEFAULT_PROFILE=aventinesolutions
export CDK_DEFAULT_REGION=us-west-2
- bootstrap the context based on the AWS account
npx cdk bootstrap
- deploy the two stacks (VPC and Security Groups will get created first, then the Compute Instances)
npx cdk deploy 'LFXCDK-*'
- destroy the stacks when the course is complete
npx cdk destroy 'LFXCDK-*'
- the IntelliJ Project includes some runtime configuration examples
- the compute instances will be accessible through the Systems Manager Fleet Manager