Coder Social home page Coder Social logo

cdk-ec2-template's Introduction

cdk-ec2-template

Wrote a CDK for those times when you just want to dabble in Linux. It's a minimal setup with a public subnet + inbound SSH access restricted to your IP.

Quick Start(5m)

create stack.

$ pnpm install
$ cd ./packages/iac
$ npx cdk deploy
...

 ✅  ec2-template

✨  Deployment time: 184.47s

Outputs:
ec2-template.ec2templateTemplateEC2Output =
aws ssm get-parameter --with-decryption --name /ec2/keypair/key-hoge --query "Parameter.Value" --output text> ec2-template.pem && chmod 400 ec2-template.pem;
ssh -i ec2-template.pem ec2-user@ip;

exec cfn outputs command.

$ aws ssm get-parameter --with-decryption --name /ec2/keypair/key-hoge --query "Parameter.Value" --output text> ec2-template.pem && chmod 400 ec2-template.pem;
ssh -i ec2-template.pem ec2-user@ip;

The authenticity of host 'ip (ip)' can't be established.
ED25519 key fingerprint is SHA256:hoge
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ip' (ED25519) to the list of known hosts.
   ,     #_
   ~\_  ####_        Amazon Linux 2
  ~~  \_#####\
  ~~     \###|       AL2 End of Life is 2025-06-30.
  ~~       \#/ ___
   ~~       V~' '->
    ~~~         /    A newer version of Amazon Linux is available!
      ~~._.   _/
         _/ _/       Amazon Linux 2023, GA and supported until 2028-03-15.
       _/m/'           https://aws.amazon.com/linux/amazon-linux-2023/

7 package(s) needed for security, out of 12 available
Run "sudo yum update" to apply all updates.

cdk-ec2-template's People

Contributors

shuntaka9576 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.