{"id":15901576,"url":"https://github.com/axel-op/package-java-aws-lambda","last_synced_at":"2025-04-02T19:42:44.204Z","repository":{"id":63151612,"uuid":"565569166","full_name":"axel-op/package-java-aws-lambda","owner":"axel-op","description":"Package a Java AWS Lambda","archived":false,"fork":false,"pushed_at":"2022-11-14T12:58:12.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-08T10:26:23.667Z","etag":null,"topics":["aws-lambda","aws-lambda-java","github-actions","maven"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axel-op.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-13T20:13:45.000Z","updated_at":"2022-11-14T02:11:10.000Z","dependencies_parsed_at":"2023-01-11T17:23:55.104Z","dependency_job_id":null,"html_url":"https://github.com/axel-op/package-java-aws-lambda","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel-op%2Fpackage-java-aws-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel-op%2Fpackage-java-aws-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel-op%2Fpackage-java-aws-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axel-op%2Fpackage-java-aws-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axel-op","download_url":"https://codeload.github.com/axel-op/package-java-aws-lambda/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246883439,"owners_count":20849486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-lambda","aws-lambda-java","github-actions","maven"],"created_at":"2024-10-06T11:05:07.784Z","updated_at":"2025-04-02T19:42:44.172Z","avatar_url":"https://github.com/axel-op.png","language":"Shell","readme":"# Package an AWS Lambda in Java\n\nA GitHub Action to package an AWS Lambda in Java with Maven.\n\nAWS Lambdas in Java [should be packaged as an Uber JAR](https://docs.aws.amazon.com/lambda/latest/dg/java-package.html#java-package-maven).\n\nThe [`maven-shade-plugin`](https://maven.apache.org/plugins/maven-shade-plugin) is used to build the Uber JAR. While configuring it in the `pom.xml` is the recommended way to use it, here we execute it from the command line so the `pom.xml` doesn't have to be edited.\n\n## Inputs/Outputs\n\n- The input `working-directory` is optional and indicates where is the root directory of your Lambda function.\n- The output `deployment-file` is an absolute path to the JAR that should be deployed (see the example below).\n\n## Example workflow\n\nThis GitHub Actions workflow shows how to deploy an AWS Lambda [using the `UpdateFunctionCode` API](https://docs.aws.amazon.com/lambda/latest/dg/API_UpdateFunctionCode.html) with the `aws` CLI:\n\n```yml\nname: Example workflow\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  deploy-aws-lambda:\n    runs-on: ubuntu-latest\n    permissions:\n      # This is required for requesting GitHub's OIDC Token\n      # See https://github.com/aws-actions/configure-aws-credentials\n      id-token: write\n    env:\n      REGION: eu-west-3\n      FUNCTION_NAME: name-of-function\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/setup-java@v2\n        with:\n          java-version: 11\n          distribution: adopt\n      - uses: axel-op/package-java-aws-lambda@main\n        id: package\n      - name: Configure AWS Credentials\n        uses: aws-actions/configure-aws-credentials@v1\n        with:\n          role-to-assume: ${{ secrets.AWS_ROLE }}\n          aws-region: ${{ env.REGION }}\n      - name: Deploy on AWS\n        env:\n          JAR: ${{ steps.package.outputs.deployment-file }}\n        run: aws lambda update-function-code --function-name $FUNCTION_NAME --zip-file \"fileb://$JAR\"\n```\n\nThe [AWS documentation](https://docs.aws.amazon.com/lambda/latest/dg/lambda-java.html) describes all the possible ways to deploy your function.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxel-op%2Fpackage-java-aws-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxel-op%2Fpackage-java-aws-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxel-op%2Fpackage-java-aws-lambda/lists"}