You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After bringing the example code over and running a cdk diff/deploy or synth i get the error below. Which states that the AttributeError: '_UserDataProxy' object has no attribute 'add_s3_download_command', so i comment out those lines, 48 though 57 of app.py in instance/ec2. Things then run fine so i used instance.user_data.add_commands(f"yum update -y") for my user_data and it also worked and created an instance.
So the question is am i doing something wrong that is causing the s3 bucket user data to not work as it is in this repo, or has something changed such that this code should/could be updated? I do not see in this cdk anything creating an S3 bucket so wonder if these lines should do that and copy this configure.sh file to the bucket for the instance or if the local file is being treated as an s3 object somehow...
(thank you)
Environment
CDK CLI Version: 1.87.1 (build 9eeaa93)
Example: ec2/instance
Example Version:
OS: Amazon Linux 2 / cloud9 env
Language: Python
Other information
Traceback (most recent call last):
File "app.py", line 61, in <module>
EC2InstanceStack(app, "ec2-instance")
File "/home/ec2-user/environment/cautious-guacamole/cdkworkshop/.env/lib64/python3.6/dist-packages/jsii/_runtime.py", line 83, in __call__
inst = super().__call__(*args, **kwargs)
File "app.py", line 49, in __init__
local_path = instance.user_data.add_s3_download_command(
AttributeError: '_UserDataProxy' object has no attribute 'add_s3_download_command'
Subprocess exited with error 1```
guidanceQuestion that needs advice or information.
1 participant
Converted from issue
This discussion was converted from issue #398 on March 31, 2022 23:31.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
❓ Guidance Question
The Question
After bringing the example code over and running a cdk diff/deploy or synth i get the error below. Which states that the
AttributeError: '_UserDataProxy' object has no attribute 'add_s3_download_command'
, so i comment out those lines, 48 though 57 of app.py in instance/ec2. Things then run fine so i usedinstance.user_data.add_commands(f"yum update -y")
for my user_data and it also worked and created an instance.So the question is am i doing something wrong that is causing the s3 bucket user data to not work as it is in this repo, or has something changed such that this code should/could be updated? I do not see in this cdk anything creating an S3 bucket so wonder if these lines should do that and copy this configure.sh file to the bucket for the instance or if the local file is being treated as an s3 object somehow...
(thank you)
Environment
Other information
Beta Was this translation helpful? Give feedback.
All reactions