input: Write a python function to create an S3 bucket, an EC2 instance, a security group, and configure the instance using boto3.
  assert create_aws_resources('example-bucket', 'ami-035be7bafff33b6b6', 'example-key', 'example-sg') == True
output: def create_aws_resources(bucket_name, ami_id, key_name, security_group_name):
      import boto3
      from botocore.exceptions import ClientError
  
      # Create S3 bucket
      s3 = boto3.client('s3')
      try:
          s3.create_bucket(Bucket=bucket_name, CreateBucketConfiguration={'LocationConstraint': 'us-west-2'})
      except ClientError as e:
          print(e)
          return False
  
      # Create EC2 client
      ec2 = boto3.client('ec2')
  
      # Create Security Group
      try:
          response = ec2.create_security_group(GroupName=security_group_name, Description='DESCRIPTION')
          security_group_id = response['GroupId']
      except ClientError as e:
          print(e)
          return False
  
      # Create EC2 instance
      try:
          instance = ec2.run_instances(
              ImageId=ami_id,
              MinCount=1,
              MaxCount=1,
              InstanceType='t2.micro',
              KeyName=key_name,
              SecurityGroupIds=[security_group_id]
          )
      except ClientError as e:
          print(e)
          return False
  
      return True