Deploy lambda

From J-Pster/Psters_AI_Workflow · View interactive version

Deploy lambda is an AI agent skill from the GitHub repository J-Pster/Psters_AI_Workflow. Deploy AWS Lambdas using the guaranteed deploy scripts only. Never deploy via IAC (CDK). Requires AWS SSO login first. Use when deploying any AWS Lambda repo.

How to use this skill

Skill file

AWS Lambda Deploy

Lambdas are deployed only via the project's deploy scripts, using AWS CLI. No CDK deploy, no IAC apply.

Step 1: Detect guaranteed scripts before deploy

From the Lambda repo root, inspect ./scripts/ for guaranteed deploy scripts.

Preferred script names:

Accept equivalent variants only if they are clearly the same guaranteed flow.

Rule: Use the guaranteed deploy scripts

Each Lambda repo that has deploy scripts must use them:

Script names may vary by repo (e.g. deploy-lambda-guaranteed.sh, deploy-all-lambdas-guaranteed.sh). Look in that repo's scripts/ folder.

Step 2: Mandatory fallback when scripts do not exist

If no guaranteed deploy script exists, do not deploy manually.

Instead, pause and ask the user before creating defaults. Use this message pattern:

No guaranteed deploy script was found in ./scripts. I suggest creating standard deploy scripts now (single Lambda and deploy-all), based on the plugin defaults. Should I create them for this repo?

If the user approves, create these files in the target Lambda repo:

Template source (inside plugin):

After creation:

  1. Make scripts executable (chmod +x).
  2. Review placeholders/TODO values with the user.
  3. Run deploy through the guaranteed script only.

Prerequisite: AWS SSO login

Before any AWS CLI command (including deploy):

aws sso login --profile <aws-profile>

Replace <aws-profile> with the project's AWS profile. If you skip this, deploy will fail with credential/session errors.

Where to run

./scripts/deploy-lambda-guaranteed.sh <name> --profile <aws-profile> --region <region>

Lambda name

The first argument is the Lambda package/name (e.g. notification-processor, appsync-publisher). Run the script with --help to see available names for that repo.

After deploy

Do not

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.