• Stars
    star
    151
  • Rank 246,057 (Top 5 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 3 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Action to set up AWS SAM CLI and add it to the PATH

setup-sam

Tests Release

Action to set up AWS SAM CLI and add it to the PATH.

This action enables you to run AWS SAM CLI commands in order to build, package, and deploy serverless applications as part of your workflow.

Example

Assuming you have a samconfig.toml at the root of your repository:

on:
  push:
    branches:
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: aws-actions/setup-sam@v2
        with:
          use-installer: true
      - uses: aws-actions/configure-aws-credentials@v2
        with:
          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws-region: us-east-2
      # Build inside Docker containers
      - run: sam build --use-container
      # Prevent prompts and failure when the stack is unchanged
      - run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset

See AWS IAM best practices for handling AWS credentials.

Inputs

version

The AWS SAM CLI version to install. Installs the latest version by default.

use-installer

Note

This is the recommended approach on supported platforms. It does not require Python to be installed, and is faster than the default installation method.

Currently supports Linux x86-64 runners.

Set to true to set up AWS SAM CLI using a native installer. Defaults to false.

python

Note

Unused if use-installer is set to true.

The Python interpreter to use for AWS SAM CLI. Defaults to python on Windows, and python3 otherwise.

You can use actions/setup-python to automatically set up Python.

Security

See CONTRIBUTING.md for more information.

License

This project is licensed under the Apache-2.0 License.

More Repositories

1

configure-aws-credentials

Configure AWS credential environment variables for use in other GitHub Actions.
TypeScript
2,460
star
2

amazon-ecr-login

Logs into Amazon ECR with the local Docker client.
JavaScript
914
star
3

amazon-ecs-deploy-task-definition

Registers an Amazon ECS task definition and deploys it to an ECS service.
JavaScript
647
star
4

aws-codebuild-run-build

Run an AWS CodeBuild project as a step in a GitHub Actions workflow job.
JavaScript
274
star
5

amazon-ecs-render-task-definition

Inserts a container image URI into an Amazon ECS task definition JSON file.
JavaScript
274
star
6

aws-cloudformation-github-deploy

Deploys AWS CloudFormation Stacks
TypeScript
248
star
7

aws-secretsmanager-get-secrets

TypeScript
144
star
8

codeguru-reviewer

84
star
9

amazon-eks-fargate

Creates an EKS on Fargate cluster
Shell
55
star
10

vulnerability-scan-github-action-for-amazon-inspector

Scan artifacts with Amazon Inspector from GitHub Actions workflows.
Python
25
star
11

sustainability-scanner

Runs AWS Sustainability Scanner against infrastructure-as-code.
Shell
19
star
12

closed-issue-message

Github Action to set a default message to be commented on all issues when they get closed.
JavaScript
10
star
13

codeguru-security

10
star
14

stale-issue-cleanup

Clean up stale issues in your repository with GitHub Actions!
JavaScript
9
star
15

cloudformation-aws-iam-policy-validator

Policy Validator for AWS IAM Policies in CloudFormation templates
Python
9
star
16

aws-devicefarm-browser-testing

Automates Browser Testing on AWS Device Farm
JavaScript
7
star
17

terraform-aws-iam-policy-validator

Policy Validator for AWS IAM Policies in Terraform templates
Python
6
star
18

aws-devicefarm-mobile-device-testing

Run automated Mobile Device Testing on AWS Device Farm
JavaScript
5
star
19

action-cloudwatch-metrics

[Unmaintained] Github Action to publish metrics to AWS CloudWatch
TypeScript
4
star