473,396 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

AWS EC2 Instance from YAML file

I am trying to understanding a coding challenge. I need to create a YAML file to automate deployment of an ec2 instance. Here is the specifications of the YAML file:

# This YAML configuration specifies a server with two volumes and two users
server:
instance_type: t2.micro
ami_type: amzn2
architecture: x86_64
root_device_type: ebs
virtualization_type: hvm
min_count: 1
max_count: 1
volumes:
- device: /dev/xvda
size_gb: 10
type: xfs
mount: /
- device: /dev/xvdf
size_gb: 20
type: ext4
mount: /data
users:
- login: user1
ssh_key: --user1 ssh public key goes here-- user1@localhost
- login: user2
ssh_key: --user2 ssh public key goes here-- user2@localhost

My Python file will read the YAML file but I am unsure of the coding structure of the automation (create user, create volumes). I can use Boto3 for AWS features. Thanks for any help provided.
Dec 29 '21 #1
0 8979

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Peter Maas | last post by:
Hi, currently I'm trying to create a pgsql backend for the roundup issue tracker using the mysql backend as a template (is somebody aware of such a thing? I couldn't find one). The author has...
30
by: Reinhold Birkenfeld | last post by:
Hello, I know that there are different YAML engines for Python out there (Syck, PyYaml, more?). Which one do you use, and why? For those of you who don't know what YAML is: visit...
1
by: Mark | last post by:
I'd like to take an instance of a class, and serialize it to a file on my computer. No security required on the file. Then, I'd like to be able to unserialize the file later and use the instance...
3
by: Peter Oliphant | last post by:
Trying to save/load a class instance to a file is tough. The reason is because there is no way to preserve its type other than by conventon. For eample, one can save all the states of the members...
4
by: Mario | last post by:
I have a C# app that runs script files. The app is launched using a command line argument to indicate which script should run. Most scripts are run indefinitely in a loop and periodically perform...
8
by: Lou Pecora | last post by:
I've been scanning Python in a Nutshell, but this seems to be either undoable or so subtle that I don't know how to do it. I want to subclass a base class that is returned from a Standard Library...
8
by: D | last post by:
Hi, I currently have a Python app with a Tkinter GUI frontend that I use for system administration. Everytime it launches, it reads a text file which contains info about each host I wish to...
2
by: EuGeNe Van den Bulke | last post by:
Hi there, I have a "problem" which could be a bad design on my behalf but I am not sure so ... I have a package WMI which contains a module hauteur.py which, when imported, load data from a...
2
by: -b | last post by:
I am trying to put together a python program that will be able to ask for a word and its definition, then save that information into an xml file for reference. I am not down right set on the file...
0
by: sabo | last post by:
I am starting work on a script that will parse a .yaml file and prep that for entry into two files. The two files will be BIND zone files. the yaml data will look something like this: entries:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.