· 9 years ago · Oct 25, 2016, 12:22 PM
1LAUNCH CONFIGURATION EXAMPLE
2
3#!/bin/bash
4#install s3cmd
5sudo apt-get install -y s3cmd
6#Add the config-file. you should generate YOUR OWN FILE AT LEAST ONCE! TO do this, install s3cmd && s3cmd --config ONCE, then copy /root/.s3cfg - THIS PATH IS FOR ROOT USER! WILL WORK ONLY FOR ROOT
7
8echo "access_key = [YOUR AWS ACCOUNT ACCESS KEY]
9bucket_location = [US]
10cloudfront_host = cloudfront.amazonaws.com
11default_mime_type = binary/octet-stream
12delete_removed = False
13dry_run = False
14enable_multipart = True
15encoding = UTF-8
16encrypt = False
17follow_symlinks = False
18force = False
19get_continue = False
20gpg_command = /usr/bin/gpg
21gpg_decrypt = %(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
22gpg_encrypt = %(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
23gpg_passphrase = q1w2e3r4t5
24guess_mime_type = True
25host_base = s3.amazonaws.com
26host_bucket = %(bucket)s.s3.amazonaws.com
27human_readable_sizes = False
28invalidate_on_cf = False
29list_md5 = False
30log_target_prefix =
31mime_type =
32multipart_chunk_size_mb = 15
33preserve_attrs = True
34progress_meter = True
35proxy_host =
36proxy_port = 0
37recursive = False
38recv_chunk = 4096
39reduced_redundancy = False
40secret_key = I9Cb6JJR5ozYj7O+BuO7ZRP051kxoDl4Cfvc6Tm3
41send_chunk = 4096
42simpledb_host = sdb.amazonaws.com
43skip_existing = False
44socket_timeout = 300
45urlencoding_mode = normal
46use_https = False
47verbosity = WARNING
48website_endpoint = http://%(bucket)s.s3-website-%(location)s.amazonaws.com/
49website_error =
50website_index = index.html" > /root/.s3cfg
51Write ths config into file
52#get a proper next-step config SH from bucket
53sudo s3cmd get --force s3://BUKKET NAME/%FILENAME.sh
54sudo chmod +x %FILENAME.sh
55sudo ./%FILENAME.sh