Connect Your Cloud

In this step-by-step build we will use infra.new to configure and deploy an application to AWS or GCP.

Create Cloud Credentials

In order to allow infra.new to deploy your application to your cloud provider, you will configure a runner that has access to your cloud account.

The runner will use these credentials in a isolated sandboxed environment to deploy your application.

To connect your AWS account, you will need to create an IAM user with the necessary permissions to deploy your application. Navigate to the IAM page on your AWS console, and create a new user.

AWS IAM User

Set the permissions for the user to allow it to deploy your application to AWS. You can grant whatever specific permissions you need, such as access to specific resources or services. If you want to grant it access to everything you can select the "AdministratorAccess" policy.

AWS IAM permissions

After your user is created you will create an access key for it. You can do this by navigating to the IAM page on your AWS console, selecting the user you just created, and clicking on the "Security credentials" tab. From there, you can create a new access key by clicking on the "Create access key" button.

Last you will need to create a S3 bucket that infra.new will use to store and infrastructure state generated by terraform. This step is optional but we recommend it for better organization and version control.

Create an infra.new Runner

Once you have created your credentials, you can create a new runner from the runners page.. A runner is an isolated sandbox that infra.new will use to run your infrastructure code. The runner will have access to any cloud credentials and environment variables you configured. In addition to the code that you generate. For AWS you will provide your access key ID and secret access key, and for GCP you can copy the contents of your service account key file that was created in the previous step.

New Runner

Deploy your Application

After your runner is setup you can create a new chat to have it start deploying your application. Provide the details below and we can start deploying an example application. You can also bring your application from a zip file or Pro users can deploy their application from a git repository.

0 guest tokens remaining

If you find want to use your bucket or GCP project across chats you can update your settings to include it in your default prompt in your prompt settings.

What's next?

Once your application is deployed you can access it at the URL provided in the output. You can further prompt infra.new to set up anything else you need. Such as:

  • Add a Postgres database
  • Add a Redis cache
  • Add a GCS or S3 bucket
  • Set up a production environment

Simply prompt the agent to add these to your application. The code will be generated for you and then the infrastructure will be deployed using your configured runner.