{"id":25231628,"url":"https://github.com/thinknimble/tn-aws-cloud-formations","last_synced_at":"2025-10-18T08:20:10.448Z","repository":{"id":242136062,"uuid":"585273437","full_name":"thinknimble/tn-aws-cloud-formations","owner":"thinknimble","description":"A cloud formation for adding new aws s3 buckets for projects","archived":false,"fork":false,"pushed_at":"2024-09-02T21:54:43.000Z","size":26,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T12:37:17.318Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thinknimble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-04T18:54:42.000Z","updated_at":"2024-09-02T21:54:45.000Z","dependencies_parsed_at":"2025-02-11T12:34:01.031Z","dependency_job_id":null,"html_url":"https://github.com/thinknimble/tn-aws-cloud-formations","commit_stats":null,"previous_names":["thinknimble/aws-s3-cloud-formation","thinknimble/tn-aws-cloud-formations"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknimble%2Ftn-aws-cloud-formations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknimble%2Ftn-aws-cloud-formations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknimble%2Ftn-aws-cloud-formations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thinknimble%2Ftn-aws-cloud-formations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thinknimble","download_url":"https://codeload.github.com/thinknimble/tn-aws-cloud-formations/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247355754,"owners_count":20925699,"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":[],"created_at":"2025-02-11T12:29:20.666Z","updated_at":"2025-10-18T08:20:05.416Z","avatar_url":"https://github.com/thinknimble.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ThinkNimble AWS CloudFormations\n\nThis repository provides AWS CloudFormation configs that streamline the process of creating application resources on AWS that we commonly use in our applications. For instance, it is best practice to create a unique IAM user per app and follow the Principle of Least Privilege, meaning that user's permissions should be limited to only what is needed for the app.\n\nThere are currently two configurations and instructions below.\n\n- [Create S3 Bucket](#create-s3-bucket)\n- [Create Bedrock Permissions Policy](#create-a-bedrock-permissions-policy)\n\nThese configurations require the AWS CLI. [Follow these instructions to get started](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)\n\n## Create S3 Bucket\n\nOur apps use S3 to store user-uploaded files and other static media. Use this cloud formaiton to quickly spin up a Bucket, IAM User, and secure Bucket Policies.\n\n**Please note if you have multiple aws accounts configured you will need to pass the profile key and if a region is not set the region key**\n\n```term\naws \u003ccommand\u003e --profile \u003cprofile-name\u003e --region \u003caws-region\u003e\n```\n\n#### What you will need\n\n- An aws access key and id with elevated priveleges to be able to run this command\n- A name for your cloud formation stack that is unique and in all caps\n- A name for your s3 bucket\n\nThings to consider:\n\n- If you have multiple aws accounts you will need to pass in your profile --profile \u003cname\u003e to the args\n- If you do not have a default region set up you will also need to pass that in\n\n### CLI Command Using the YAML File\n\nFor this to work, you will need to download the YAML file or clone this repository.\n\nIf you are setting this up on an aws account that does not have the file stored in its own S3 you will need to use the local file.\n\n```term\naws cloudformation create-stack --stack-name \u003cSTACK-NAME\u003e --template-body file://\u003cFILE-PATH\u003e  --region us-east-1 --parameters ParameterKey=BucketNameParameter,ParameterValue=\u003cBUCKET-NAME\u003e --capabilities CAPABILITY_NAMED_IAM\n```\n\n### CLI Command Using the URL\n\nFor convenience, the configs are also available on a public S3 bucket, so that you do not need to download them.\n\n```term\naws cloudformation create-stack --stack-name \u003cSTACK-NAME\u003e --template-url 'https://tn-s3-cloud-formation.s3.amazonaws.com/aws-s3-cloud-formation.yaml'  --region us-east-1 --parameters ParameterKey=BucketNameParameter,ParameterValue=\u003cBUCKET-NAME\u003e --capabilities CAPABILITY_NAMED_IAM\n```\n\nThe following arguments are required:\n\n- `--stack-name \u003cSTACK-NAME\u003e` this must be unique\n- `--parameters ParameterKey=BucketNameParameter,ParameterValue=\u003cBUCKET-NAME\u003e` BUCKET-NAME must be unique and lowercased\n- `--capabilities CAPABILITY_NAMED_IAM`\n- `--template-body file://\u003cFILE-PATH\u003e` path should start with file:// one of `--template-body` or `--template-url`\n- `--template-url \u003cFILE-URL\u003e` one of `--template-body` or `--template-url`\n\n### Using the AWS Console\n\nYou can also run the \"stack\" from the AWS Console:\n\n- Visit the console, sign in and navigate to the CloudFormation Dashboard\n- Click create stack (with new resources)\n- select Template is ready\n- Select Amazon S3 URL and provide the yaml file from this repo uploaded to S3 as the [link](https://tn-s3-cloud-formation.s3.amazonaws.com/aws-s3-cloud-formation.yaml)\n- Click next and pass in the required parameter value (S3 Bucket Name)\n\n### Get the appropriate output variables\n\nWhen the cloud formation is done you can get the Access Key ID, Secret, and Bucket name from the outputs\n\n#### Using the cli\n\n`aws cloudformation describe-stacks --stack-name \u003cSTACK-NAME\u003e` from the previously create command\n\nThis will return a json object to retrieve the variables tab down to the `Outputs` key\n\n#### Using the console\n\nVisit the CloudFormation Dashboard, click into the new stack you created and then tap the Outputs Tab\n\n### Instructions for manual creation (No Cloud Formation)\n\nIf you do not want to use the cloud formation here are instructions for manually creating the appropriate resources\n\n[Read on Notion](https://www.notion.so/thinknimble/AWS-b5e1ffd8f06d459788515843fea41418#c723773015fd436c9ba801ba663dda13)\n\n## Create an AWS Bedrock Permissions Policy\n\nOur apps use AWS Bedrock for fast and low-cost LLM features. An IAM User with the proper permissions is required.\n\n## Setup\n\nFirst, an AWS Administrator will need to enable Amazon Bedrock organization-wide. They will have to request access to the models we want to use. To do this: Go to AWS Bedrock in the console and follow the instructions there. We have already done this for ThinkNimble's AWS accounts in us-east-1.\n\n### With File\n\n```term\naws cloudformation create-stack --stack-name \u003cSTACK-NAME\u003e --template-body file://bedrock-user-permissions.yaml  --region us-east-1 --parameters ParameterKey=ProjectName,ParameterValue=\u003cPROJECTNAME\u003e ParameterKey=AllowedModels,ParameterValue=\u003cSOME_MODEL_ARN_OR_*_FOR_DEFAULT_ALL\u003e --capabilities CAPABILITY_NAMED_IAM\n```\n\n### With URL\n\n```term\naws cloudformation create-stack --stack-name \u003cSTACK-NAME\u003e --template-url 'https://tn-s3-cloud-formation.s3.amazonaws.com/bedrock-user-permissions.yaml' --region us-east-1 --parameters ParameterKey=ProjectName,ParameterValue=\u003cPROJECTNAME\u003e ParameterKey=AllowedModels,ParameterValue=\u003cSOME_MODEL_ARN_OR_*_FOR_DEFAULT_ALL\u003e  --capabilities CAPABILITY_NAMED_IAM\n```\n\n### Check Status \u0026 Outputs with File\n\n```term\naws cloudformation describe-stacks --stack-name \u003cSTACK-NAME\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinknimble%2Ftn-aws-cloud-formations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthinknimble%2Ftn-aws-cloud-formations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthinknimble%2Ftn-aws-cloud-formations/lists"}