Deploying to AWS usually means a long-lived access key in a CI secret, or a role wired by hand for every repository. apx-aws-lambda is the Action Platform plugin that removes the key: AWS itself trusts the platform's OIDC tokens through an IAM-only connect stack in your account, so that no AWS key ever lives on the platform, on a machine or in a repository — and nothing of ours runs in the account. apx- is the prefix every Action Platform extension carries.
What you get
- The
aws/lambda deploy target (SAM). deploy, rollback, diagnose and destroy for a project, with every line sam prints streamed to the platform's run log.
- One overlay for every language.
template.yaml, samconfig.toml, a one-line Makefile, requirements/ (IAM examples) and an optional .github/workflows/deploy.yml. The Lambda Web Adapter layer runs the project as an HTTP server on $PORT, so every web/* template of the official repository deploys.
- Keyless credentials. A connected account (the connect stack), a role of your own through OIDC, or the AWS CLI's own chain. The token's session tag keeps each deploy inside its app, and a permissions boundary caps every execution role.
- Readiness before anything is built. The platform checks credentials, stack state, the deploy role's permissions (simulated with
iam:SimulatePrincipalPolicy) and sam validate --lint after every release, and refuses a blocked deploy unless forced.
- Deployment strategies.
recreate, canary, blue_green and rolling (as linear) on Lambda versions and the alias live's weighted routing, with CloudWatch health checks.
- Read-only tools.
aws_lambda_stacks and aws_lambda_functions for MCP, and action-platform aws-lambda connect|stacks|functions for the terminal.
Install
action-platform plugin install aws-lambda
action-platform cloud set aws/lambda # overlay files come from this plugin
action-platform deploy --dry-run # preflight: credentials, sam validate
action-platform deploy # sam build + sam deploy --config-env <stage>
action-platform diagnose
On a hosted platform an instance owner installs the plugin first, under Admin → Plugins. Requires action-platform 0.32.0 or newer; the Requirements section lists the rest.
Contents
- What the plugin does
- Credentials without keys
- A connected account (recommended)
- Updating the connect stack
- A role of your own (OIDC)
- The AWS CLI's own credentials
- Deployment strategies
- Where the deploy runs
- Tools and commands
- Requirements
- Development
- How it fits in Action Platform
- Contributing
- License
What the plugin does
|
|
| Overlay |
template.yaml, samconfig.toml, a one-line Makefile (ap-build package), requirements/ (IAM examples), .github/workflows/deploy.yml (optional). One template for every language: the Lambda Web Adapter layer runs the project as an HTTP server on $PORT — run.sh from ap-build (Python python3.12, Node nodejs22.x, Java/Kotlin java21, Ruby ruby3.3) or bootstrap on provided.al2023 (Go and Rust static binaries, PHP with a static PHP CLI behind php -S, C# a self-contained dotnet publish). Every web/* template of the official repository deploys; the health route is /health (API Gateway keeps /ping for itself on execute-api). Template parameters the target fills: Stage (the scope's name), and for a connected account PermissionsBoundaryArn and RolePath |
| Readiness |
before a deploy, without building or changing anything: the tooling is there, the overlay is applied, the stack name resolves, the credentials work, the stack is not mid-operation or failed (a failed first creation — ROLLBACK_COMPLETE or ROLLBACK_FAILED — is a warning: the deploy deletes it), the overlay takes a connected account's boundary and role path, the deploy role may do what the template needs (simulated with iam:SimulatePrincipalPolicy against the stack, the function, its log group, the execution role and every public layer the template references — the Lambda Web Adapter's, for one) and sam validate --lint passes. The platform runs it after every release for each of the app's scopes and refuses a blocked deploy unless forced; action-platform readiness runs it on a machine. A stack its own pipeline deploys (an observed target) skips the credentials and permissions checks, since that pipeline deploys with another identity; its state is read only when an identity can read it |
| Deploy |
sam build + sam deploy --config-env <stage> (scope prod → prod, any other → default). A stack left by a failed first creation (ROLLBACK_COMPLETE, ROLLBACK_FAILED) is deleted first; when that delete fails on a resource that was never created, the stack is deleted again with it retained. On a connected account, an overlay without PermissionsBoundaryArn and RolePath stops the deploy before the build. Every line sam prints reaches the platform's run log as it appears — the deploy form, the run dialog, action-platform logs -f |
| Rollback |
CloudFormation rollback-stack — previous stack state |
| Diagnose |
stack status and the HTTP API url |
| Destroy |
sam delete of the stage's stack, the execution role SAM created with it |
| Tools |
aws_lambda_stacks, aws_lambda_functions |
| Commands |
action-platform aws-lambda connect\|stacks\|functions |
[deploy] in platform.toml:
[deploy]
target = "aws/lambda"
region = "us-east-1" # optional; samconfig.toml / AWS_REGION otherwise
health = "/health" # optional; checked through the HTTP API after the deploy, "" skips it
Deploying itself goes through the core's deploy / rollback / diagnose, which drive the target.
Credentials without keys
The target looks for credentials in this order:
Under [deploy] |
How |
Who decides what the app may do |
role_arn |
sts assume-role-with-web-identity with a platform token |
the role's trust and permission policies |
neither, and the organization's AWS account ID (or deploy role ARN) set on the platform (Connect → Deploy → AWS Lambda), which every deploy job carries as AP_AWS_LAMBDA_ROLE_ARN with AP_APP |
sts assume-role-with-web-identity on the connect stack's role with the platform's token for the app |
the token's session tag and the role's policy, in your account |
| neither |
the AWS CLI's own chain: SSO, profile, instance role |
whatever that identity may do |
A connected account (recommended)
One CloudFormation stack, IAM only — no function, no table, nothing to upgrade. AWS itself trusts the platform's OIDC tokens; the token's session tag keeps each deploy inside its app.
1. Create the stack — once per AWS account, with an IAM user or role that may create IAM resources (not the root account). On the platform: Connect → Deploy → AWS Lambda → Configure → Connect AWS (an instance owner installs the plugin first, under Admin → Plugins). The button copies a command and opens AWS CloudShell, behind the AWS sign-in; paste the command and press Enter. It downloads this release's connect/template.yaml from GitHub, deploys it as the stack action-platform-connect in us-east-1 with the platform's url and the organization's slug, and prints the account ID.
Without the button, the same stack from a machine logged in to the account: