import boto3 import os
os.environ['AWS_DEFAULT_REGION'] = 'us-west-2'
efs = boto3.client('efs')
response = efs.create_access_point(
FileSystemId='
security_group_id = "
response = client.authorize_security_group_ingress(
GroupId=security_group_id,
IpPermissions=[
{
'IpProtocol': 'tcp',
'FromPort': 2049,
'ToPort': 2049,
'UserIdGroupPairs': [
{
'GroupId': security_group_id
},
],
'PrefixListIds': [],
'IpRanges': [
{
'CidrIp': '
import os import boto3
efs = boto3.client('efs')
mount_path = '/mnt/efs'
file_system_id = '
os.makedirs(mount_path, exist_ok=True)
efs_client = efs_client = boto3.client('efs') efs_client.describe_file_systems() os.system('sudo yum -y install amazon-efs-utils') os.system(f'sudo mount -t efs -o tls,accesspoint={access_point_id} {file_system