#Project: VPC Endpoint S3 Gateway
##Architecture
No modules.
Name |
Description |
Type |
Default |
Required |
all_traffic |
all traffic to public |
string |
"0.0.0.0/0" |
no |
ami |
AMI ID for ec2 instance, this value changes for each region |
string |
"ami-0ed9277fb7eb570c9" |
no |
az |
Availability zone for subnet(a,b,c,d,e,f) |
string |
"a" |
no |
private_subnet_cidr |
CIDR for private subnet |
string |
"10.0.1.0/24" |
no |
public_subnet_cidr |
CIDR for public subnet |
string |
"10.0.0.0/24" |
no |
region |
AWS region for provider |
string |
"us-east-1" |
no |
vpc_cidr |
VPC CIDR |
string |
"10.0.0.0/16" |
no |
#public instance
ssh -i narenkp.pem [email protected]
Last login: Mon Jan 3 11:39:23 2022 from 104.145.93.107
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-10-0-0-148 ~]$ aws s3 ls
2022-01-03 11:20:08 sample-bucket-20220102050000
2022-01-03 11:48:26 this-is-another-bucket
[ec2-user@ip-10-0-0-148 ~]$ echo "hey how are you ?"> b.txt
[ec2-user@ip-10-0-0-148 ~]$ aws s3 cp b.txt s3://sample-bucket-20220102050000/
upload: ./b.txt to s3://sample-bucket-20220102050000/b.txt
[ec2-user@ip-10-0-0-148 ~]$ aws s3 cp b.txt s3://this-is-another-bucket/
upload: ./b.txt to s3://this-is-another-bucket/b.txt
#able to upload file
#private Instance
[ec2-user@ip-10-0-0-148 ~]$ ssh -i narenkp.pem [email protected]
Last login: Mon Jan 3 11:39:28 2022 from 10.0.0.148
__| __|_ )
_| ( / Amazon Linux 2 AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-2/
[ec2-user@ip-10-0-1-223 ~]$ aws s3 ls
2022-01-03 11:20:08 sample-bucket-20220102050000
2022-01-03 11:48:26 this-is-another-bucket
[ec2-user@ip-10-0-1-223 ~]$ echo "some text" > c.txt
[ec2-user@ip-10-0-1-223 ~]$ aws s3 cp c.txt s3://sample-bucket-20220102050000/
upload: ./c.txt to s3://sample-bucket-20220102050000/c.txt
[ec2-user@ip-10-0-1-223 ~]$ aws s3 cp c.txt s3://this-is-another-bucket/
upload failed: ./c.txt to s3://this-is-another-bucket/c.txt An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
[ec2-user@ip-10-0-1-223 ~]$
#unable to able to upload file