I am facing a problem while calling the variable values within the double quote
Here's my code:
AccountID = ["1234567","5678912"]
for account in range(len(AccountID)):
response = sts.assume_role(RoleArn=(f"arn:aws:iam::{AccountID[account]}:role/Cloudbees_Jenkins"), RoleSessionName="learnaws-test-session")
print(response)
I have return response output with no variable values
File "test3.py", line 19
response = (RoleArn=(f"arn:aws:iam::{AccountID[account]}:role/Cloudbees_Jenkins"), RoleSessionName="learnaws-test-session")
^
SyntaxError: invalid syntax
how would i return an expected results like:
arn:aws:iam::1234567:role/Cloudbees_Jenkins
arn:aws:iam::5678912:role/Cloudbees_Jenkins