Accessing Prebid Server logs from EFS - Prebid Server Deployment on AWS

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

  1. Sign in to the Amazon EC2 console.

  2. Choose Launch instance.

  3. Provide a name and leave the default Amazon Machine Image and instance type.

  4. Choose Key pair, and select a key pair. Create one if you don’t already have any.

  5. Under Network settings, choose Edit.

  6. Select PrebidVpc.

  7. Select the public subnet that is the 10.8.0.0 network - PrebidVpc/Prebid-PublicSubnet1.

  8. Select Create security group and use default settings.

  9. Leave the default storage settings and choose Launch instance.

To enable incoming NFS connections to the EFS access point

  1. Navigate to the Amazon EFS console.

  2. In the navigation pane, choose File systems.

  3. Open the EFS file system that is in the prebid stack.

  4. Choose the Network tab and note the security group ID for the security group with PrebidfsEfsSecurityGroup in the name.

  5. Navigate to the Amazon EC2 console.

  6. In the navigation pane, choose Security Groups.

  7. Open the solution’s security group and choose Edit inbound rules.

  8. Under Edit inbound rules:

    1. Choose Add rule.

    2. Under Type, select NFS.

    3. Under Source, select Custom.

    4. Enter 10.0.0.0/8 for CIDR blocks.

    5. Choose Save rules.

  9. Return to the EFS system and choose File system policy.

  10. Choose Edit, add elasticfilesystem:ClientMount to the list of allowed actions, and choose Save.

To mount the EFS file system

  1. Navigate to the AWS CloudFormation console.

  2. Open the solution’s stack, select the Resources tab, and select the EFS file system.

  3. Choose Attach.

  4. Copy the NFS mount command.

  5. SSH into the EC2 instance that you just created.

  6. Make a mount point directory:

    sudo mkdir efs
  7. 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