Python relative imports in AWS Lambda fail with attempted relative import with no known parent package
In AWS Lambda if I attempt an explicit relative import like this
.
├── lambda_file.py
└── example.py
| // production usage at your own risk | |
| const fs = require("fs"); | |
| let numberOfProcesses = 1; | |
| let maxMemory = 128; | |
| let maxMemoryPerInstance = 128; | |
| if (fs.existsSync("/run/config.json")) { | |
| const pshConfig = require("/run/config.json"); | |
| // on grid environments, we don't want to round up to not run too many processes |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| # Copyright (C) 2015-2017 Carlos Jenkins <[email protected]> | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |
| #!/bin/bash | |
| for pid in $(cd /proc && find . -maxdepth 2 -type f -name status | grep -o '[0-9]*'); do grep -q VmSwap /proc/$pid/status > /dev/null 2>&1 && echo -n "$(grep VmSwap /proc/$pid/status)" && ps h -p $pid -o args ; done | sort -k 2 -n -r | cut -c 1-200 |
| ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl |
This installation is going to require 2 servers one acts as kerberos KDC server
and the other machine is going to be client. Lets assume the FQDN's are (here
cw.com is the domain name, make a note of the domain name here):
Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in
| import javax.net.ssl.SSLParameters; | |
| import javax.net.ssl.SSLSocket; | |
| import javax.net.ssl.SSLSocketFactory; | |
| import java.io.*; | |
| /** Establish a SSL connection to a host and port, writes a byte and | |
| * prints the response. See | |
| * http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
| */ | |
| public class SSLPoke { |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |