{"id":18248156,"url":"https://github.com/serverless-components/aws-iam-role","last_synced_at":"2025-04-04T15:32:11.085Z","repository":{"id":54359256,"uuid":"176523583","full_name":"serverless-components/aws-iam-role","owner":"serverless-components","description":"⚡ The easiest way to deploy and manage AWS IAM Roles, powered by Serverless Components.","archived":false,"fork":false,"pushed_at":"2024-10-03T08:19:50.000Z","size":179,"stargazers_count":14,"open_issues_count":3,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T15:01:32.173Z","etag":null,"topics":["aws","iam-role","serverless","serverless-components"],"latest_commit_sha":null,"homepage":"https://www.serverless.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/serverless-components.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-19T13:57:01.000Z","updated_at":"2024-09-06T06:14:54.000Z","dependencies_parsed_at":"2022-08-13T13:20:24.186Z","dependency_job_id":null,"html_url":"https://github.com/serverless-components/aws-iam-role","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Faws-iam-role","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Faws-iam-role/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Faws-iam-role/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serverless-components%2Faws-iam-role/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serverless-components","download_url":"https://codeload.github.com/serverless-components/aws-iam-role/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247203024,"owners_count":20900896,"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","iam-role","serverless","serverless-components"],"created_at":"2024-11-05T09:36:04.299Z","updated_at":"2025-04-04T15:32:06.071Z","avatar_url":"https://github.com/serverless-components.png","language":"JavaScript","readme":"[![Serverless Components](https://s3.amazonaws.com/public.assets.serverless.com/images/readme_serverless_components.gif)](http://serverless.com)\n\n\u003cbr/\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003e\u003ca href=\"https://github.com/serverless-components/aws-iam-role/tree/v1\"\u003eClick Here for Version 1.0\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n**AWS IAM Role Component** ⎯⎯⎯ The easiest way to deploy and manage AWS IAM Roles, powered by [Serverless Components](https://github.com/serverless/components/tree/cloud).\n\n\u003cbr/\u003e\n\n- [x] **Minimal Configuration** - Abstracts IAM roles complexity.\n- [x] **Fast Deployments** - IAM roles are deploys in seconds via our cloud engine.\n- [x] **Team Collaboration** - Simply share IAM role arn and other outputs with your team's components.\n- [x] **Easy Management** - Easily manage your IAM roles with the Serverless Dashboard\n\n\u003cbr/\u003e\n\n\u003cimg src=\"/assets/deploy-demo.gif\" height=\"250\" align=\"right\"\u003e\n\n1. [**Install**](#1-install)\n2. [**Initialize**](#2-initialize)\n3. [**Deploy**](#3-deploy)\n4. [**Configure**](#4-configure)\n5. [**Develop**](#5-develop)\n6. [**Monitor**](#6-monitor)\n7. [**Remove**](#7-remove)\n\n\u0026nbsp;\n\n### 1. Install\n\nTo get started with component, install the latest version of the Serverless Framework:\n\n```\n$ npm install -g serverless\n```\n\nAfter installation, make sure you connect your AWS account by setting a provider in the org setting page on the [Serverless Dashboard](https://app.serverless.com).\n\n### 2. Initialize\n\nThe easiest way to start using the `aws-iam-role` component is by initializing the `aws-iam-role-starter` template. Just run this command:\n\n```\n$ serverless init aws-iam-role-starter\n$ cd aws-iam-role-starter\n```\n\n### 3. Deploy\n\nOnce you have the directory set up, you're now ready to deploy. Just run the following command from within the directory containing the `serverless.yml` file:\n\n```\n$ serverless deploy\n```\n\nYour first deployment might take a little while, but subsequent deployment would just take few seconds. For more information on what's going on during deployment, you could specify the `--debug` flag, which would view deployment logs in realtime:\n\n```\n$ serverless deploy --debug\n```\n\n### 4. Configure\n\nThe `aws-iam-role` component requires a minimal set of configuration with sane defaults that makes working with IAM roles easier. Here's a complete reference of the `serverless.yml` file for the `aws-iam-role` component:\n\n```yml\ncomponent: aws-iam-role             # (required) name of the component. In that case, it's aws-iam-role.\nname: my-role                       # (required) name of your component instance.\norg: serverlessinc                  # (optional) serverless dashboard org. default is the first org you created during signup.\napp: myApp                          # (optional) serverless dashboard app. default is the same as the name property.\nstage: dev                          # (optional) serverless dashboard stage. default is dev.\n\ninputs:\n  name: my-role                     # (optional) role name. default is the component instance name above.\n  service: lambda.amazonaws.com     # (optional) service that assumes this role. default is lambda.amazonaws.com.\n  policy:                           # (optional) inline policy statement, or managed policy arn. default is the admin arn.\n    - Effect: Allow\n      Action:\n        - sts:AssumeRole\n      Resource: '*'\n    - Effect: Allow\n      Action:\n        - logs:CreateLogGroup\n        - logs:CreateLogStream\n        - logs:PutLogEvents\n      Resource: '*'\n```\n\nYou can also provide a managed policy ARN string instead of an inline policy statement:\n\n```yml\ncomponent: aws-iam-role\nname: my-role\n\ninputs:\n  service: lambda.amazonaws.com\n  policy: arn:aws:iam::aws:policy/AdministratorAccess\n```\n\nOnce you've chosen your configuration, run `serverless deploy` again (or simply just `serverless`) to deploy your changes.\n\n### 5. Develop\n\nInstead of having to run `serverless deploy` everytime you make changes you wanna test, you could enable dev mode, which allows the CLI to watch for changes in your config (for example, your policy document) in real time, and deploy instantly on save.\n\nTo enable dev mode, just run the following command:\n\n```\n$ serverless dev\n```\n\n### 6. Monitor\n\nAnytime you need to know more about your running `aws-iam-role` instance, you can run the following command to view the most critical info.\n\n```\n$ serverless info\n```\n\nThis is especially helpful when you want to know the outputs of your instances so that you can reference them in another instance. It also shows you the status of your instance, when it was last deployed, and how many times it was deployed. You will also see a url where you'll be able to view more info about your instance on the Serverless Dashboard.\n\nTo digg even deeper, you can pass the `--debug` flag to view the state of your component instance in case the deployment failed for any reason.\n\n```\n$ serverless info --debug\n```\n\n### 7. Remove\n\nIf you wanna tear down your entire `aws-iam-role` infrastructure that was created during deployment, just run the following command in the directory containing the `serverless.yml` file.\n\n```\n$ serverless remove\n```\n\nThe `aws-iam-role` component will then use all the data it needs from the built-in state storage system to delete only the relavent cloud resources that it created. Just like deployment, you could also specify a `--debug` flag for realtime logs from the website component running in the cloud.\n\n```\n$ serverless remove --debug\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Faws-iam-role","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserverless-components%2Faws-iam-role","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserverless-components%2Faws-iam-role/lists"}