Giter Site home page Giter Site logo

callummackenzie / latest-lambda-layer-action Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 306 KB

Update the AWS lambda layers for a given function to their latest versions

JavaScript 97.37% Shell 2.63%
actions lambda gihub-actions aws-lambda aws-lambda-layers aws-lambda-layer

latest-lambda-layer-action's Introduction

Latest Lambda Layer Action

This action takes given aws credentials and updates the lambda layers of the given function to their latest versions

Usage

name: Update AWS Lambda Function Layers

on:
  release:
    types: [created]
  push:
    branches:
      - master

jobs:
  update_lambda_layers:
  	name: Update lambda layer versions
    runs-on: ubuntu-latest
    steps:
      - name: Update layers
        uses: callummackenzie/[email protected]
        with:
          aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws_region: ${{ secrets.AWS_REGION }
          function_name: SomeAWSFunction

Parameters

  • aws_access_key_id
    • Required
    • The aws access key id for an IAM user
  • aws_secret_access_key
    • Required
    • The secret access key for the same IAM user used in aws_access_key_id
  • aws_region
    • Required
    • The aws region in which the desired lambda function is located such as us-east-1
  • function_name
    • Required
    • The lambda function name to be updated (not the ARN)

AWS Permissions Policy

The AWS IAM user this action uses must have permissions to:

  • lambda:GetFunctionConfiguration for the desired lambda(s)
  • lambda:ListLayerVersions for the desired layer(s)
  • lambda:UpdateFunctionConfiguration for the desired lambda(s)

latest-lambda-layer-action's People

Contributors

callummackenzie avatar

Watchers

 avatar

latest-lambda-layer-action's Issues

Error when using Amazon Layer

User: arn:aws:iam::<numbers>:user/github-actions is not authorized to perform: lambda:ListLayerVersions on resource: arn:aws:lambda:***:133256977650:layer:AWS-Parameters-and-Secrets-Lambda-Extension because no resource-based policy allows the lambda:ListLayerVersions action

Not sure how to get past this. It's got the same permissions as my other layers in the policy, but no matter what I change I always get this error. I'm assuming it's something weird with it not being owned by me, but honestly I've got absolutely no idea why it won't work.

        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "lambda:ListLayerVersions",
            "Resource": "*"
        }

Any ideas? It's a shame because I can't get it to update just my other layers.
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.