final one i swear

This commit is contained in:
Aleksandra Jonas 2023-01-29 23:38:31 +01:00
parent ec07ad5ad4
commit 4552dc4366
3 changed files with 59 additions and 23 deletions

View File

@ -1,6 +1,6 @@
# Public cloud 4.1/4.3
Please, edit `aws_cli.py` with your credentials, according to the following example:
Please, create a `aws_cli.py` with your credentials, according to the template in the `aws_credentials_template.py`:
```python
aws_access_key_id=''
@ -10,11 +10,9 @@ aws_session_token=''
DEFAULT_VPC = ''
```
where all variables are of String data type.
## Run
To use application, go to the project directory and run the following line in terminal:
Go to the project directory and run the following in terminal:
```bash
python3 main.py

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@ from user_data import user_data
import boto3, time
PREFIX = 'peachy'
PREFIX = 's444391'
if __name__ == '__main__':
@ -17,15 +17,16 @@ if __name__ == '__main__':
#TODO key pair
key_pair = ec2.create_key_pair(
KeyName=PREFIX + '_key',
KeyName=PREFIX + '-key',
KeyType='ed25519',
KeyFormat='pem',
)
#TODO security group
security_group = ec2.create_security_group(
Description=PREFIX + '_group',
GroupName=PREFIX + '_group',
Description=PREFIX + '-group',
GroupName=PREFIX + '-group',
VpcId=DEFAULT_VPC,
)