Skip to content
This repository has been archived by the owner on Oct 30, 2020. It is now read-only.

Commit

Permalink
Update SetupAWS.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushev committed Jun 7, 2019
1 parent 959d5e7 commit 74f1d8a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/aws_config_quick_start/SetupAWS.py
Expand Up @@ -39,19 +39,17 @@ def prereq():
# Store certId
cert_id = result['certificateId']
cert_id_filename = thing_name + '_cert_id_file'
os.chmod(cert_id_file_path, 0o444)
cert_id_file = open(cert_id_filename, 'w')
os.chmod(os.path.abspath(cert_id_filename), 0o444)
cert_id_file.write(cert_id)
cert_id_file_path = os.path.abspath(cert_id_filename)
cert_id_file.close()

# Store cert_pem as file
cert_pem = result['certificatePem']
cert_pem_filename = thing_name + '_cert_pem_file'
os.chmod(cert_pem_file_path, 0o444)
cert_pem_file = open(cert_pem_filename, 'w')
os.chmod(os.path.abspath(cert_pem_filename), 0o444)
cert_pem_file.write(cert_pem)
cert_pem_file_path = os.path.abspath(cert_pem_filename)
cert_pem_file.close()

# Create a Policy if doesn't exist
Expand Down

0 comments on commit 74f1d8a

Please sign in to comment.