PyCharm, Lambda & AWS Explorer

Hi PyCharm

The 'AWS Explorer' tool works well.  Question: can it be extended to support the editing and debugging of AWS Lambda functions?

Why?  I've using SAM for the last 6 months and unfortunately find I have challenges such as:
 - Slow execution performance, even with options such as --keep-it-warm
- Security challenges, everything is VPC based
- Execution sometime differs between SAM and AWS

In the interim I have resorted to using: Before Launch/External Tools/ custom scripts (see below) for each Lambda function.  This allows me to press RUN and have the function and all its local dependencies and ZIPped and uploaded to AWS Lambda and then run.

While this is pretty simple, a more streamlined process would be helpful.

FYI other imports are loaded into a generic Lambda Layer/s and attached to the specific Lambda Function as required.


# File: TS-Test-03.cmd
# Created by: XXX
# Date: 2021-08-10 - 2021-08-15
# Version: 0.1a
# TS-Test-03.cmd $FileName$ $ProjectName$ $ModuleName$

echo 'Filename:' $1
echo 'Projet:' $2
echo 'Module:' $3
echo '---'


# zip local function as self and include 'lib' directory
zip -r TS-Test-03 lib

# update Lambda function
aws lambda update-function-code --function-name TS-Test-03 --zip-file fileb://

# update the Lambda function handler, or we could check in returned JSON above in Handler
aws lambda update-function-configuration \
--function-name TS-Test-03 \
--handler TS-Test-03.lambda_handler

# invoke uploaded Lambda function
aws lambda invoke \
--function-name TS-Test-03 --cli-binary-format raw-in-base64-out \
--payload '{"value1": "1", "value2": "22"}' out \
--log-type Tail --query 'LogResult' --output text | base64 -d

echo '---'
Comment actions Permalink

Hi, do you use AWS Toolkit plugin? If so, this plugin is developed by Amazon, so you may want to ask the question on their forums or the respective issue tracker:

Maybe someone from the community can provide an answer here as well...

Comment actions Permalink

Hi Andrey, thanks for the reply!   Yes I am using the AWS Toolkit plugin (AWS have done a great job on this BTW) - I'll move my question over to them to see what they think.  BTW there is an 'Update Function Code' option from the AWS Toolkit Plugin but forces you to upload to S3.  This is not the process I am looking for as development is not seamless...


Please sign in to leave a comment.