Manage your Laravel infrastructure on Vapor and fall in love with the scalability and simplicity of serverless.
Laravel Vapor is an auto-scaling, serverless deployment platform for Laravel, powered by AWS Lambda. Manage your Laravel infrastructure on Vapor and fall in love with the scalability and simplicity of serverless.
Vapor abstracts the complexity of managing Laravel applications on AWS Lambda, as well as interfacing those applications with SQS queues, databases, Redis clusters, networks, CloudFront CDN, and more. Some highlights of Vapor’s features include:
Auto-scaling web / queue infrastructure fine tuned for Laravel
Zero-downtime deployments and rollbacks
Environment variable / secret management
Database management, including point-in-time restores and scaling
Redis Cache management, including cluster scaling
Database and cache tunnels, allowing for easy local inspection
Automatic uploading of assets to Cloudfront CDN during deployment
Unique, Vapor assigned vanity URLs for each environment, allowing immediate inspection
Custom application domains
DNS management
Certificate management and renewal
Application, database, and cache metrics
CI friendly
In short, you can think of Vapor as Laravel Forge for serverless technology.
Vapor requires that your application be compatible with PHP 7.3+ and Laravel 6.0+.
Before integrating Vapor into your application, you should create a Vapor account. If you are just collaborating with others on their projects, you are not required to have a Vapor subscription. To create and manage your own projects, you will need a Vapor subscription.
You will deploy your Laravel Vapor applications using the Vapor CLI. This CLI may be installed globally or on a per-project basis using Composer:
When the CLI is installed per project, you will likely need to execute it via the vendor/bin
directory of your project, which is where Composer installs executables. For example, to view all of the available Vapor CLI commands, you may use the list
command:
To save keystrokes when interacting with per-project installations of the Vapor CLI, you may add a shell alias to your operating system that aliases the vapor
command to php vendor/bin/vapor
.
To learn more about a command and its arguments, execute the help
command with the name of the command you wish to explore:
After you have installed the Vapor CLI, you should authenticate with your Vapor account using the login
command:
The laravel/vapor-core
package must be installed as a dependency of every Laravel application that is deployed using Vapor. This package contains various Vapor runtime files and a service provider to allow your application to run on Vapor. You may install the Vapor Core into your project using Composer:
After creating a Vapor account, your account will be on our free “sandbox” plan, which allows you to experience the power of Vapor without the upfront commitment of subscribing to a paid plan. A sandbox account allows you to provision services such as networks, databases, and caches. You may add a single project which, once deployed, will be accessible via an AWS Lambda function URL.
Sandbox projects may not utilize API Gateway versions, load balancers, firewalls, or custom domains. To utilize these features, you will need to choose a subscription plan.
When you create your Vapor account, a “Personal” team is automatically created for you. You can rename this team in your team settings. All projects, databases, caches, and other Vapor resources belong to a team. You are free to create as many teams as you wish via the Vapor UI or the team
CLI command. There is no additional charge for creating teams, and they serve as a great way to organize your projects by client or topic.
When managing Vapor resources via the CLI, you will need to be aware of your currently active team. You may view your current team using the team:current
command:
To change your active team, you may use the team:switch
command:
You can invite more people to your team via the “Team Settings” menu in the Vapor UI, or using the team:add
CLI command. When you add a new collaborator to your team via the Vapor UI, you may select the permissions to assign to that person. For example, you can prevent a given team member from deleting databases or caches.
You may remove collaborators from your team using the Vapor UI or team:remove
CLI command.
In order to deploy projects or create other resources using Vapor, you will need to link an active AWS account on your team’s settings management page.
To create a new IAM role, navigate to the IAM service on your AWS dashboard. Once you are in the IAM dashboard, you may select “Roles” from the left-side navigation panel and click the “Create Role” button.
The process for creating the role is outlined in these steps:
AdministratorAccess
policy or create a custom policy with the specific permissions required by Vapor. After selecting a policy, click “Next.”Since Vapor manages many types of resources across more than a dozen AWS services, it may be convenient to create a role with the AdministratorAccess
policy. If desired, you may create a separate AWS account to house this role and contain all of your Vapor resources.
On the permissions management screen, you may grant full administrator access to the IAM role by selecting the “AdministratorAccess” policy. Or, you would prefer to not provide administrator access to Vapor, you may instead create a custom permission policy with the specific permissions needed by Vapor.
It is necessary to create two policies due to the policy size limit set by AWS. To do so, select “Create policy” from the “Permissions policies” panel. Choose the JSON option and provide the first permission definition below. Then, follow the same process to create another policy using the second definition listed below. Once the policies have been defined, you may attach them to your new IAM role:
It’s probable this list of permissions will change as we add new features to Vapor, which may result in unexpected errors if your policy is not kept up to date.
When linking your AWS account to Vapor, it is important to stay informed about your AWS costs. This can be done directly in the AWS Console using the AWS Budgets service. In addition, you can use Vapor’s managed budgets to define your monthly AWS budget in USD, while also configuring multiple alarms directly on the “Team Settings > AWS Accounts” screen of the Vapor UI. At this time, up to five alarms can be configured:
Actual cost > 85%
Actual cost > 100%
Actual cost > 200%
Actual cost > 500%
Forecasted cost > 100%
Each alarm can be triggered once per monthly billing period. When an alarm is triggered, the team owner will receive an email, allowing them to act quickly and avoid unexpected charges.
AWS Service Limits can be increased through the following options:
From the AWS console
From the AWS CLI
From a support case
For additional information, refer to the following AWS documentation:
In order to receive notifications via Slack, you will need to create a Slack App and select the workspace to which the Slack App should be installed.
Once the Slack App has been created, visit the Incoming Webhooks settings pane of your App under the “Features” sidebar. Then, activate the Incoming Webhooks feature using the activation switch.
Once activated, you can create a new Incoming Webhook using the Add New Webhook to Workspace button. Finally, you should copy the Webhook URL provided by Slack and insert into your team’s Notifications Settings.
Our Terms of Service and Privacy Policy provide details on the terms, conditions, and privacy practices for using Laravel Vapor.
Manage your Laravel infrastructure on Vapor and fall in love with the scalability and simplicity of serverless.
Laravel Vapor is an auto-scaling, serverless deployment platform for Laravel, powered by AWS Lambda. Manage your Laravel infrastructure on Vapor and fall in love with the scalability and simplicity of serverless.
Vapor abstracts the complexity of managing Laravel applications on AWS Lambda, as well as interfacing those applications with SQS queues, databases, Redis clusters, networks, CloudFront CDN, and more. Some highlights of Vapor’s features include:
Auto-scaling web / queue infrastructure fine tuned for Laravel
Zero-downtime deployments and rollbacks
Environment variable / secret management
Database management, including point-in-time restores and scaling
Redis Cache management, including cluster scaling
Database and cache tunnels, allowing for easy local inspection
Automatic uploading of assets to Cloudfront CDN during deployment
Unique, Vapor assigned vanity URLs for each environment, allowing immediate inspection
Custom application domains
DNS management
Certificate management and renewal
Application, database, and cache metrics
CI friendly
In short, you can think of Vapor as Laravel Forge for serverless technology.
Vapor requires that your application be compatible with PHP 7.3+ and Laravel 6.0+.
Before integrating Vapor into your application, you should create a Vapor account. If you are just collaborating with others on their projects, you are not required to have a Vapor subscription. To create and manage your own projects, you will need a Vapor subscription.
You will deploy your Laravel Vapor applications using the Vapor CLI. This CLI may be installed globally or on a per-project basis using Composer:
When the CLI is installed per project, you will likely need to execute it via the vendor/bin
directory of your project, which is where Composer installs executables. For example, to view all of the available Vapor CLI commands, you may use the list
command:
To save keystrokes when interacting with per-project installations of the Vapor CLI, you may add a shell alias to your operating system that aliases the vapor
command to php vendor/bin/vapor
.
To learn more about a command and its arguments, execute the help
command with the name of the command you wish to explore:
After you have installed the Vapor CLI, you should authenticate with your Vapor account using the login
command:
The laravel/vapor-core
package must be installed as a dependency of every Laravel application that is deployed using Vapor. This package contains various Vapor runtime files and a service provider to allow your application to run on Vapor. You may install the Vapor Core into your project using Composer:
After creating a Vapor account, your account will be on our free “sandbox” plan, which allows you to experience the power of Vapor without the upfront commitment of subscribing to a paid plan. A sandbox account allows you to provision services such as networks, databases, and caches. You may add a single project which, once deployed, will be accessible via an AWS Lambda function URL.
Sandbox projects may not utilize API Gateway versions, load balancers, firewalls, or custom domains. To utilize these features, you will need to choose a subscription plan.
When you create your Vapor account, a “Personal” team is automatically created for you. You can rename this team in your team settings. All projects, databases, caches, and other Vapor resources belong to a team. You are free to create as many teams as you wish via the Vapor UI or the team
CLI command. There is no additional charge for creating teams, and they serve as a great way to organize your projects by client or topic.
When managing Vapor resources via the CLI, you will need to be aware of your currently active team. You may view your current team using the team:current
command:
To change your active team, you may use the team:switch
command:
You can invite more people to your team via the “Team Settings” menu in the Vapor UI, or using the team:add
CLI command. When you add a new collaborator to your team via the Vapor UI, you may select the permissions to assign to that person. For example, you can prevent a given team member from deleting databases or caches.
You may remove collaborators from your team using the Vapor UI or team:remove
CLI command.
In order to deploy projects or create other resources using Vapor, you will need to link an active AWS account on your team’s settings management page.
To create a new IAM role, navigate to the IAM service on your AWS dashboard. Once you are in the IAM dashboard, you may select “Roles” from the left-side navigation panel and click the “Create Role” button.
The process for creating the role is outlined in these steps:
AdministratorAccess
policy or create a custom policy with the specific permissions required by Vapor. After selecting a policy, click “Next.”Since Vapor manages many types of resources across more than a dozen AWS services, it may be convenient to create a role with the AdministratorAccess
policy. If desired, you may create a separate AWS account to house this role and contain all of your Vapor resources.
On the permissions management screen, you may grant full administrator access to the IAM role by selecting the “AdministratorAccess” policy. Or, you would prefer to not provide administrator access to Vapor, you may instead create a custom permission policy with the specific permissions needed by Vapor.
It is necessary to create two policies due to the policy size limit set by AWS. To do so, select “Create policy” from the “Permissions policies” panel. Choose the JSON option and provide the first permission definition below. Then, follow the same process to create another policy using the second definition listed below. Once the policies have been defined, you may attach them to your new IAM role:
It’s probable this list of permissions will change as we add new features to Vapor, which may result in unexpected errors if your policy is not kept up to date.
When linking your AWS account to Vapor, it is important to stay informed about your AWS costs. This can be done directly in the AWS Console using the AWS Budgets service. In addition, you can use Vapor’s managed budgets to define your monthly AWS budget in USD, while also configuring multiple alarms directly on the “Team Settings > AWS Accounts” screen of the Vapor UI. At this time, up to five alarms can be configured:
Actual cost > 85%
Actual cost > 100%
Actual cost > 200%
Actual cost > 500%
Forecasted cost > 100%
Each alarm can be triggered once per monthly billing period. When an alarm is triggered, the team owner will receive an email, allowing them to act quickly and avoid unexpected charges.
AWS Service Limits can be increased through the following options:
From the AWS console
From the AWS CLI
From a support case
For additional information, refer to the following AWS documentation:
In order to receive notifications via Slack, you will need to create a Slack App and select the workspace to which the Slack App should be installed.
Once the Slack App has been created, visit the Incoming Webhooks settings pane of your App under the “Features” sidebar. Then, activate the Incoming Webhooks feature using the activation switch.
Once activated, you can create a new Incoming Webhook using the Add New Webhook to Workspace button. Finally, you should copy the Webhook URL provided by Slack and insert into your team’s Notifications Settings.
Our Terms of Service and Privacy Policy provide details on the terms, conditions, and privacy practices for using Laravel Vapor.