What is causing this error?
The AMI ID must be updated for the us-west-1 region in the Lambda function as well
The Lambda function can only launch EC2 instances in the same region where it is deployed
The Lambda function does not have the necessary IAM permission to launch more than one EC2 instance
The instance type defined in the Lambda function is not available in the us-west-1 region
Explanations:
The AMI ID is region-specific, so when launching an EC2 instance in the us-west-1 region, the Lambda function must reference a valid AMI ID for that region.
AWS Lambda functions can launch EC2 instances in any region, regardless of where the Lambda function is deployed.
The Lambda function does not require special IAM permissions to launch more than one EC2 instance; it needs permission to launch EC2 instances in the first place.
The t2.nano instance type is available in the us-west-1 region, so this is not the cause of the failure.