Set up GitHub Actions to deploy this repository via AWS Deployer - creates workflow, updates CloudFormation template with required parameters, and generates parameter files.
Automates GitHub Actions setup for AWS Deployer by creating a workflow, updating CloudFormation templates with required parameters, and generating parameter files. Use when a repository needs CI/CD deployment configured.
/plugin marketplace add savaki/savaki-marketplace/plugin install aws-deployer@savaki-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill automatically configures a GitHub repository to deploy via AWS Deployer (github.com/savaki/aws-deployer).
setup-deployer skill if not)cloudformation.template file (will be created if missing)S3_ARTIFACT_BUCKET environment variable set to your artifacts bucketAWS_REGION environment variable set to your AWS regionWhen this skill is invoked, you will configure the repository for GitHub Actions deployment by:
.git/configS3_ARTIFACT_BUCKET, AWS_REGION) first, ask only if not set.github/workflows/deploy.ymlaws-deployer setup-github and configuring GitHub secretsImportant:
S3_ARTIFACT_BUCKET and AWS_REGIONus-west-2 if not setaws-deployer setup-github command. Explain to the user how to run it.AWS_ROLE_ARN, S3_ARTIFACT_BUCKET, and AWS_REGION.Extract the repository owner and name from Git configuration:
# Get the remote URL
git config --get remote.origin.url
Parse the result to extract owner/repo:
https://github.com/foo/bar.git → foo/bargit@github.com:foo/bar.git → foo/barStore as REPO_FULL_NAME (e.g., foo/bar)
S3 Bucket:
S3_ARTIFACT_BUCKET environment variable is set
echo $S3_ARTIFACT_BUCKET
my-artifacts-bucketS3_ARTIFACT_BUCKETAWS Region:
AWS_REGION environment variable is set
echo $AWS_REGION
us-west-2us-east-1, us-east-2, eu-west-1, ap-southeast-1Initial Environment: Default to dev (don't ask)
Check for common build files and infer the build command:
Makefile with build target → make buildpackage.json with build script → npm run buildgo.mod → go build ./...pom.xml → mvn packagebuild.gradle → gradle buildIf multiple or none found, ask the user for the build command.
Create .github/workflows/deploy.yml:
name: Deploy to AWS
on:
push:
branches:
- main
- develop
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Set version variables
id: version
run: |
REPO="<repo-owner>/<repo-name>"
BRANCH="${{ github.ref_name }}"
SHA_SHORT="${{ github.sha }}"
SHA_SHORT="${SHA_SHORT:0:6}"
VERSION="${{ github.run_number }}.${SHA_SHORT}"
S3_PREFIX="${REPO}/${BRANCH}/${VERSION}"
echo "repo=${REPO}" >> $GITHUB_OUTPUT
echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "s3_prefix=${S3_PREFIX}" >> $GITHUB_OUTPUT
- name: Build application
run: |
<build-command>
- name: Generate CloudFormation parameters
run: |
cat > cloudformation-params.json <<EOF
{
"Env": "dev",
"Version": "${{ steps.version.outputs.version }}",
"S3Bucket": "${{ secrets.S3_ARTIFACT_BUCKET }}",
"S3Prefix": "${{ steps.version.outputs.s3_prefix }}"
}
EOF
- name: Upload to S3
run: |
S3_PATH="s3://${{ secrets.S3_ARTIFACT_BUCKET }}/${{ steps.version.outputs.s3_prefix }}/"
# Upload CloudFormation template
aws s3 cp cloudformation.template "${S3_PATH}"
# Upload parameters
aws s3 cp cloudformation-params.json "${S3_PATH}"
# Upload environment-specific parameters if they exist
if [ -f cloudformation-params.dev.json ]; then
aws s3 cp cloudformation-params.dev.json "${S3_PATH}"
fi
if [ -f cloudformation-params.prd.json ]; then
aws s3 cp cloudformation-params.prd.json "${S3_PATH}"
fi
# Upload any build artifacts as needed
# Example: aws s3 cp build/function.zip "${S3_PATH}"
- name: Deployment info
run: |
echo "✓ Deployed version: ${{ steps.version.outputs.version }}"
echo "✓ S3 path: s3://${{ secrets.S3_ARTIFACT_BUCKET }}/${{ steps.version.outputs.s3_prefix }}/"
echo "✓ Environment: dev"
Replace placeholders:
<repo-owner>/<repo-name>: Full repository name from Git (e.g., mycompany/my-app)<build-command>: Detected or user-provided build commandNote: The workflow uses ${{ secrets.AWS_REGION }} which will be configured as a GitHub secret.
If cloudformation.template exists, read it and check for required parameters.
If any of these parameters are missing, add them:
Parameters:
Env:
Type: String
Default: dev
Description: Environment name (dev, staging, prd)
AllowedValues:
- dev
- staging
- prd
Version:
Type: String
Description: Build version in format {build_number}.{commit_hash}
S3Bucket:
Type: String
Description: Artifacts bucket name
S3Prefix:
Type: String
Description: S3 path to artifacts in format {repo}/{branch}/{version}
If cloudformation.template doesn't exist, create a simple example:
AWSTemplateFormatVersion: '2010-09-09'
Description: Deployment for <repo-name>
Parameters:
Env:
Type: String
Default: dev
Description: Environment name (dev, stg, prd, etc)
Version:
Type: String
Description: Build version in format {build_number}.{commit_hash}
S3Bucket:
Type: String
Description: Artifacts bucket name
S3Prefix:
Type: String
Description: S3 path to artifacts in format {repo}/{branch}/{version}
Resources:
# TODO: Add your infrastructure resources here
# Example:
# MyBucket:
# Type: AWS::S3::Bucket
# Properties:
# BucketName: !Sub '${Env}-<repo-name>-${AWS::AccountId}'
# Tags:
# - Key: Version
# Value: !Ref Version
# - Key: Environment
# Value: !Ref Env
Common usage patterns:
MyFunction:
Type: AWS::Lambda::Function
Properties:
FunctionName: !Sub '${Env}-my-function'
Code:
S3Bucket: !Ref S3Bucket
S3Key: !Sub '${S3Prefix}/function.zip'
Environment:
Variables:
VERSION: !Ref Version
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Family: !Sub '${Env}-my-service'
ContainerDefinitions:
- Name: app
Image: !Sub '${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/my-app:${Version}'
Create cloudformation-params.json as a template:
{
"Env": "dev",
"Version": "1.000000",
"S3Bucket": "<bucket-name>",
"S3Prefix": "<repo-owner>/<repo-name>/main/1.000000"
}
Replace:
<bucket-name>: S3 bucket name provided by user<repo-owner>/<repo-name>: Full repo name from GitNote: The GitHub workflow dynamically generates this file during deployment, but this template file:
Environment-specific parameter files allow you to override or add parameters per environment. They merge with the base cloudformation-params.json.
How they work:
cloudformation-params.json firstcloudformation-params.<env>.json if it existsWhen to use them:
Create cloudformation-params.dev.json:
{
}
Create cloudformation-params.prd.json:
{
}
Example with actual parameters:
If your CloudFormation template has:
Parameters:
InstanceType:
Type: String
Default: t3.micro
EnableDebugMode:
Type: String
Default: "false"
You might use:
cloudformation-params.dev.json:
{
"InstanceType": "t3.micro",
"EnableDebugMode": "true"
}
cloudformation-params.prd.json:
{
"InstanceType": "m5.large",
"EnableDebugMode": "false"
}
After creating all files, explain to the user how to set up GitHub OIDC authentication and configure the required secrets. Make sure to clearly communicate that they need to:
aws-deployer setup-github CLI command (you do NOT run it for them)AWS_REGION GitHub secretAWS_ROLE_ARN, S3_ARTIFACT_BUCKET, AWS_REGIONProvide the following instructions:
Your repository is now configured for AWS Deployer! Before the GitHub Actions workflow can run, you need to set up GitHub OIDC authentication and configure GitHub secrets.
Required GitHub Secrets: Your workflow requires THREE GitHub secrets to be configured:
AWS_ROLE_ARN - IAM role for GitHub OIDC authenticationS3_ARTIFACT_BUCKET - S3 bucket for storing deployment artifactsAWS_REGION - AWS region where the deployer is runningYou need to run the aws-deployer setup-github CLI command to configure GitHub OIDC authentication.
Prerequisites:
GitHub Personal Access Token (PAT) stored in AWS Secrets Manager:
# Create a PAT at https://github.com/settings/tokens with 'repo' scope
# Then store it in Secrets Manager:
aws secretsmanager create-secret \
--name github/pat-token \
--secret-string '{"github_pat":"ghp_xxxxxxxxxxxxx"}' \
--region <region>
AWS Deployer CLI built and available:
# Build the CLI if not already available
cd /path/to/aws-deployer
make build-cli
Run the setup command:
aws-deployer setup-github \
--role-name github-actions-<short-repo-name> \
--repo <repo-owner>/<repo-name> \
--bucket <bucket-name> \
--github-token-secret github/pat-token \
--region <region>
For your repository:
aws-deployer setup-github \
--role-name github-actions-<short-repo-name> \
--repo <full-repo-name> \
--bucket <bucket-name> \
--github-token-secret github/pat-token \
--region <region>
What this command does:
github-actions-<repo-name> with S3 upload permissionsAWS_ROLE_ARN secret to your GitHub repositoryS3_ARTIFACT_BUCKET secret to your GitHub repositoryAfter running the aws-deployer setup-github command, verify that these GitHub secrets exist. You may need to add AWS_REGION manually:
Required secrets:
AWS_ROLE_ARN - Created by aws-deployer setup-github commandS3_ARTIFACT_BUCKET - Created by aws-deployer setup-github commandAWS_REGION - Must be added manuallyTo add AWS_REGION manually:
https://github.com/<owner>/<repo>/settings/secrets/actionsAWS_REGION<region> (e.g., us-west-2)Verify all secrets exist:
Go to https://github.com/<owner>/<repo>/settings/secrets/actions and confirm:
AWS_ROLE_ARN - IAM role ARN for GitHub OIDCS3_ARTIFACT_BUCKET - S3 bucket name (e.g., <bucket-name>)AWS_REGION - AWS region (e.g., <region>)Once all secrets are configured:
After pushing code, monitor the deployment:
https://github.com/<owner>/<repo>/actions# Get state machine ARN
STATE_MACHINE_ARN=$(aws ssm get-parameter \
--name "/<env>/aws-deployer/state-machine-arn" \
--query 'Parameter.Value' \
--output text)
# List recent executions
aws stepfunctions list-executions \
--state-machine-arn "${STATE_MACHINE_ARN}" \
--max-results 10
# S3 trigger logs
aws logs tail /aws/lambda/<env>-aws-deployer-s3-trigger --follow
# Build trigger logs
aws logs tail /aws/lambda/<env>-aws-deployer-trigger-build --follow
# Check build history
aws dynamodb query \
--table-name <env>-aws-deployer--builds \
--key-condition-expression "pk = :pk" \
--expression-attribute-values '{":pk":{"S":"<repo-name>/dev"}}'
Cause: GitHub OIDC not configured or secrets missing
Fix:
aws-deployer setup-github command shown aboveAWS_ROLE_ARNS3_ARTIFACT_BUCKETAWS_REGIONaws iam get-role --role-name github-actions-<repo-name> \
--query 'Role.AssumeRolePolicyDocument'
Cause: GitHub secret not configured
Fix: Run the aws-deployer setup-github command to create the secret, or manually add it:
https://github.com/<owner>/<repo>/settings/secrets/actionsS3_ARTIFACT_BUCKETCause: S3 trigger Lambda not configured or wrong S3 path
Fix:
# Check S3 files were uploaded
aws s3 ls s3://<bucket-name>/<repo-owner>/<repo-name>/ --recursive
# Check S3 trigger Lambda logs
aws logs tail /aws/lambda/<env>-aws-deployer-s3-trigger --since 10m
Check stack events:
# List stacks for this repo
aws cloudformation describe-stacks \
--query 'Stacks[?contains(StackName, `<repo-name>`)].{Name:StackName, Status:StackStatus}'
# Get detailed errors
aws cloudformation describe-stack-events \
--stack-name <env>-<repo-name> \
--max-items 20
After running this skill, you should have:
.github/workflows/deploy.yml - GitHub Actions workflowcloudformation.template - CloudFormation template with required parameterscloudformation-params.json - Base parameters templatecloudformation-params.dev.json - Dev environment parameters (empty initially)cloudformation-params.prd.json - Production environment parameters (empty initially)This skill configured your repository for AWS Deployer by:
Next steps:
aws-deployer setup-github command to configure GitHub OIDCAWS_REGION GitHub secret manuallyAWS_ROLE_ARN, S3_ARTIFACT_BUCKET, AWS_REGIONcloudformation.templateFor infrastructure setup, use the setup-deployer skill.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.