Skip to main content

Setup GitHub action Open ID connect for AWS made easy.

Project description

Documentation Status https://github.com/MacHu-GWU/gh_action_open_id_in_aws-project/actions/workflows/main.yml/badge.svg https://img.shields.io/pypi/v/gh-action-open-id-in-aws.svg https://img.shields.io/pypi/l/gh-action-open-id-in-aws.svg https://img.shields.io/pypi/pyversions/gh-action-open-id-in-aws.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to gh_action_open_id_in_aws Documentation

https://gh-action-open-id-in-aws.readthedocs.io/en/latest/_static/gh_action_open_id_in_aws-logo.png

To use GitHub Actions to deploy applications to AWS, we have to setup the permission properly.

The old school method is to use Secret Environment Variable to store the AWS IAM User credentials. You can store access key abd secret key to the AWS_ACCESS_KEY_ID 和 AWS_SECRET_ACCESS_KEY environment variables. This is also the solution used by CircleCI.

Around Nov 2021, AWS and GitHub made the official Open ID Connection (OIDC) available. It simplifies the process of granting AWS permissions to GitHub Actions. This is the AWS recommended way, and AWS explicitly mentioned that it is NOT recommended to use long term IAM user credential for CI/CD.

This Python tool automates the process of setting up the GitHub action open id connection in AWS.

Reference:

Developer Guide

This section is for developers who want to contribute to this project.

What under the hood is a CloudFormation template. The gh_action_open_id_in_aws/cf.py file contains the AWS CDK source code. The cdk/cdk_synth.py script can generate the JSON CloudFormation template using AWS CDK. The developer then can copy the output template to the gh_action_open_id_in_aws/cft-{year}-{month}-{day}.json file and do local testing.

Install

gh_action_open_id_in_aws is released on PyPI, so all you need is to:

$ pip install gh-action-open-id-in-aws

To upgrade to latest version:

$ pip install --upgrade gh-action-open-id-in-aws

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_action_open_id_in_aws-1.0.1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_action_open_id_in_aws-1.0.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file gh_action_open_id_in_aws-1.0.1.tar.gz.

File metadata

File hashes

Hashes for gh_action_open_id_in_aws-1.0.1.tar.gz
Algorithm Hash digest
SHA256 30a7713d80769858f900d4cab87cea75c1d6d19fda7f777de744fd170b3aadd5
MD5 53a0a33f53db3938cc157604b1a960c7
BLAKE2b-256 006078a8abeb18265a2f77776d07700f88dba5e5a5a90980231b73da467feca0

See more details on using hashes here.

File details

Details for the file gh_action_open_id_in_aws-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gh_action_open_id_in_aws-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 644ea79a3099f86fdadd6693f173e195d4cdf9845d050f5219a04d3d4bc43a24
MD5 40699d0951618dad5dc83cc318ee17d4
BLAKE2b-256 c8ab9669917f2ae1ea9fe012b9d2121ca75a63c1fdaf47fe232b8b9b94a7c71a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page