@classmethod<EOL><INDENT>def from_s3_json(cls, bucket_name, key,<EOL>json_path=None, key_mapping=None,<EOL>aws_profile=None,<EOL>aws_access_key_id=None,<EOL>aws_secret_access_key=None,<EOL>region_name=None):  <DEDENT>
import boto3<EOL>ses = boto3.Session(<EOL>aws_access_key_id=aws_access_key_id,<EOL>aws_secret_access_key=aws_secret_access_key,<EOL>region_name=region_name,<EOL>profile_name=aws_profile,<EOL>)<EOL>s3 = ses.resource("<STR_LIT>")<EOL>bucket = s3.Bucket(bucket_name)<EOL>object = bucket.Object(key)<EOL>data = json.loads(object.get()["<STR_LIT>"].read().decode("<STR_LIT:utf-8>"))<EOL>return cls._from_json_data(data, json_path, key_mapping)<EOL>
Load database credential from json on s3.

:param bucket_name: str
:param key: str
:param aws_profile: if None, assume that you are using this from
    AWS cloud. (service on the same cloud doesn't need profile name)
:param aws_access_key_id: str, not recommend to use
:param aws_secret_access_key: str, not recommend to use
:param region_name: str