Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lmammino/cdk-ubuntu-ec2
An example of how to provision an Ubuntu-based EC2 instance using AWS CDK
https://github.com/lmammino/cdk-ubuntu-ec2
aws cdk iac machine provision typescript ubuntu virtual
Last synced: 23 days ago
JSON representation
An example of how to provision an Ubuntu-based EC2 instance using AWS CDK
- Host: GitHub
- URL: https://github.com/lmammino/cdk-ubuntu-ec2
- Owner: lmammino
- License: mit
- Created: 2021-08-05T13:54:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-05T18:58:11.000Z (over 3 years ago)
- Last Synced: 2024-10-04T15:42:17.165Z (about 1 month ago)
- Topics: aws, cdk, iac, machine, provision, typescript, ubuntu, virtual
- Language: TypeScript
- Homepage: https://loige.co
- Size: 164 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cdk-ubuntu-ec2
This repository shows an example of using [AWS CDK](https://aws.amazon.com/cdk/) to provision an Ubuntu-based EC2 instance with a running nginx server.
This will include installing the [AWS Linux utilities](https://github.com/aws-quickstart/quickstart-linux-utilities) in the machine.
You can read more about this example in the article [Provision an Ubuntu-based EC2 instance with CDK](https://loige.co/provision-ubuntu-ec2-with-cdk).
## Code structure
This is a standard CDK project.
The main stack definition can be found in [`lib/cdk-ubuntu-ec2-stack.ts`](/lib/cdk-ubuntu-ec2-stack.ts).
The stack is instantiated in [`bin/cdk-ubuntu-ec2.ts`](/bin/cdk-ubuntu-ec2.ts).
## Requirements and deployment
In order to be able to deploy this CDK project you need to have the following:
- An AWS account
- The [AWS CLI](https://aws.amazon.com/cli/) installed and configured in your development machine
- [AWS CDK](https://aws.amazon.com/cdk/) installed and configured in your development machine
- Node.js and npm installedNow, in order to deploy this CDK project to your AWS account, you simply have to clone this repository and from the root folder of the project run:
```bash
npm install
```To install the necessary dependencies, and then:
```bash
cdk deploy
```To synthesise and deploy the project stack.
Then prompt `y` for yes.
If you want to clean up your account you can delete this stack with:
```bash
cdk destroy
```## Contributing
Everyone is very welcome to contribute to this project.
You can contribute just by submitting bugs or suggesting improvements by
[opening an issue on GitHub](https://github.com/lmammino/cdk-ubuntu-ec2/issues).## License
Licensed under [MIT License](LICENSE). © Luciano Mammino.