Skip to content

Single source code for different accounts

0

I wanted to create a simple aws amplify application which just lists all the buckets in the AWS account along with the list of files present in each.

I want to automate creating this application across 50-100 AWS accounts.

asked 2 years ago201 views

1 Answer
0

Creating an AWS Amplify application that lists all buckets and their contents across multiple AWS accounts is possible, but it requires careful planning and implementation. Here's an approach you can consider:

  1. Create a base Amplify application: Develop your Amplify application that lists S3 buckets and their contents. This will serve as your template for deployment across multiple accounts.

  2. Use AWS Organizations: Implement AWS Organizations to manage your multiple AWS accounts efficiently. This service allows you to centrally govern and manage your accounts.

  3. Implement cross-account access: Set up IAM roles in each account that allow your Amplify application to access S3 bucket information. You'll need to ensure these roles have the necessary permissions to list buckets and their contents.

  4. Automate deployment: Use AWS Control Tower in conjunction with AWS Service Catalog to automate the provisioning and deployment of your Amplify application across multiple accounts. You can create a product in Service Catalog that represents your Amplify application and use the ProvisionProduct API to deploy it to each account.

  5. Configure environment-specific settings: Use Amplify's environment feature to manage different configurations for each account. This allows you to maintain a single codebase while customizing specific settings for each deployment.

  6. Implement account switching: In your application, implement a mechanism to switch between accounts. This could involve using AWS Security Token Service (STS) to assume the appropriate IAM role for each account.

  7. Centralized management: Consider implementing a central management console or dashboard that can interact with all your deployed Amplify applications across different accounts.

Remember that this approach requires careful consideration of security implications, especially when dealing with cross-account access. Ensure that you follow AWS best practices for multi-account strategies and implement proper access controls and monitoring.

Also, keep in mind that managing and maintaining applications across 50-100 accounts can be complex. You may need to implement additional tools and processes for monitoring, updating, and troubleshooting your applications at scale.

Sources
Using multiple AWS accounts - AWS Setup
AWS Amplify Resources - Amazon Web Services
Walkthrough: Automate Account Provisioning in AWS Control Tower by Service Catalog APIs - AWS Control Tower

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.