Accessing Prebid Server logs from EFS
The following procedure describes how to access Prebid Server logs from EFS.
To create an EC2 instance that will function as a bastion host
-
Sign in to the Amazon EC2 console
. -
Choose Launch instance.
-
Provide a name and leave the default Amazon Machine Image and instance type.
-
Choose Key pair, and select a key pair. Create one if you don’t already have any.
-
Under Network settings, choose Edit.
-
Select
PrebidVpc
. -
Select the public subnet that is the 10.8.0.0 network -
PrebidVpc/Prebid-PublicSubnet1
. -
Select Create security group and use default settings.
-
Leave the default storage settings and choose Launch instance.
To enable incoming NFS connections to the EFS access point
-
Navigate to the Amazon EFS console
. -
In the navigation pane, choose File systems.
-
Open the EFS file system that is in the prebid stack.
-
Choose the Network tab and note the security group ID for the security group with
PrebidfsEfsSecurityGroup
in the name. -
Navigate to the Amazon EC2 console
. -
In the navigation pane, choose Security Groups.
-
Open the solution’s security group and choose Edit inbound rules.
-
Under Edit inbound rules:
-
Choose Add rule.
-
Under Type, select NFS.
-
Under Source, select Custom.
-
Enter
10.0.0.0/8
for CIDR blocks. -
Choose Save rules.
-
-
Return to the EFS system and choose File system policy.
-
Choose Edit, add
elasticfilesystem:ClientMount
to the list of allowed actions, and choose Save.
To mount the EFS file system
-
Navigate to the AWS CloudFormation console
. -
Open the solution’s stack, select the Resources tab, and select the EFS file system.
-
Choose Attach.
-
Copy the NFS mount command.
-
SSH into the EC2 instance that you just created.
-
Make a mount point directory:
sudo mkdir efs
-
Paste the NFS mount command that you copied earlier. It looks similar to this:
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-xxxxxxxxxxxxxxxxx.efs.us-east-1.amazonaws.com:/ efs