This commit is contained in:
2025-06-16 21:54:40 -07:00
parent d10c38e2a2
commit 6055a94285
6 changed files with 22 additions and 22 deletions

View File

@ -41,7 +41,7 @@
because it mentioned lab 2, so my assumption was that it had already been set up because it mentioned lab 2, so my assumption was that it had already been set up
(it was not). So I had to go back and fix the missing outbound connection. (it was not). So I had to go back and fix the missing outbound connection.
![screenshot of listing s3 contents](./assets/s3-access-screenshot.jpg) ![screenshot of listing s3 contents](./assets/s3-access-screenshot.png)
### Stretch Goals ### Stretch Goals
- [x] **Deep Dive into Bucket Policies** - [x] **Deep Dive into Bucket Policies**

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@ -101,27 +101,27 @@ resource "aws_iam_policy" "ec2_s3_policy" {
} }
} }
# Create AMI # # Create AMI
resource "aws_ami_from_instance" "ami_snapshot" { # resource "aws_ami_from_instance" "ami_snapshot" {
name = "ami-snapshot-2025-06-17" # name = "ami-snapshot-2025-06-17"
source_instance_id = aws_instance.my_first_linux.id # source_instance_id = aws_instance.my_first_linux.id
snapshot_without_reboot = true # snapshot_without_reboot = true
#
tags = { # tags = {
Name = "labs" # Name = "labs"
} # }
} # }
#
# Launch new instance from AMI # # Launch new instance from AMI
resource "aws_instance" "my_second_linux" { # resource "aws_instance" "my_second_linux" {
instance_type = "t2.micro" # instance_type = "t2.micro"
ami = aws_ami_from_instance.ami_snapshot.id # ami = aws_ami_from_instance.ami_snapshot.id
security_groups = ["ssh-access-witch"] # security_groups = ["ssh-access-witch"]
#
tags = { # tags = {
Name = "labs" # Name = "labs"
} # }
} # }