From 346679055d6391d9f980322bf0d1cb8ac45f3861 Mon Sep 17 00:00:00 2001 From: mikolajpaterka Date: Sun, 29 Jan 2023 21:03:14 +0100 Subject: [PATCH] 5 final --- 5/README.md | 3 +++ 5/api.py | 1 + 5/index.html | 22 ++++++++++++++++++++++ 5/main.py | 5 +---- 5/policy.json | 13 +++++++++++++ 5 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 5/README.md create mode 100644 5/index.html create mode 100644 5/policy.json diff --git a/5/README.md b/5/README.md new file mode 100644 index 0000000..19e9d18 --- /dev/null +++ b/5/README.md @@ -0,0 +1,3 @@ +### SaaS 5.2 i 5.3 + +[link](http://dxh2j7qvjtcxi.cloudfront.net/) \ No newline at end of file diff --git a/5/api.py b/5/api.py index 81a3292..6f5ac24 100644 --- a/5/api.py +++ b/5/api.py @@ -15,6 +15,7 @@ def daj_dane(plik): sprzedawca = dane[dane.index('Sprzedawca:') : dane.index('Nabywca:')] sprzedawca_nazwa = sprzedawca[1] nip = sprzedawca[-1].replace('NIP: ', '') + return { 'vat_id' : nip, 'salesman' : sprzedawca_nazwa, diff --git a/5/index.html b/5/index.html new file mode 100644 index 0000000..c820ac7 --- /dev/null +++ b/5/index.html @@ -0,0 +1,22 @@ + + + + Chmura + + + +

+ + \ No newline at end of file diff --git a/5/main.py b/5/main.py index cc4042b..dac2578 100644 --- a/5/main.py +++ b/5/main.py @@ -56,7 +56,4 @@ if __name__ == '__main__': KeyName=key_pair.name, UserData=user_data, SecurityGroups=[security_group.group_name], - ) - - - \ No newline at end of file + ) \ No newline at end of file diff --git a/5/policy.json b/5/policy.json new file mode 100644 index 0000000..6ff2060 --- /dev/null +++ b/5/policy.json @@ -0,0 +1,13 @@ +{ + "Version": "2012-10-17", + "Id": "MyPolicy", + "Statement": [ + { + "Sid": "PublicReadForGetBucketObjects", + "Effect": "Allow", + "Principal": "*", + "Action": "s3:GetObject", + "Resource": "arn:aws:s3:::s444455buckettest/*" + } + ] +} \ No newline at end of file