Skip to content

Commit d1e46b5

Browse files
committed
add gdk to user path after install, beter IAM role example
1 parent 1ef700b commit d1e46b5

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,55 @@ DDA consists of several key components:
252252

253253
2. **Create edge device policy**:
254254
- Policy name: `dda-greengrass-policy`
255+
```json
256+
{
257+
"Version": "2012-10-17",
258+
"Statement": [
259+
{
260+
"Effect": "Allow",
261+
"Action": [
262+
"greengrass:*"
263+
],
264+
"Resource": "*"
265+
},
266+
{
267+
"Effect": "Allow",
268+
"Action": [
269+
"s3:GetObject",
270+
"s3:ListBucket"
271+
],
272+
"Resource": [
273+
"arn:aws:s3:::*/*",
274+
"arn:aws:s3:::*"
275+
]
276+
},
277+
{
278+
"Effect": "Allow",
279+
"Action": [
280+
"logs:CreateLogGroup",
281+
"logs:CreateLogStream",
282+
"logs:PutLogEvents",
283+
"logs:DescribeLogStreams"
284+
],
285+
"Resource": "arn:aws:logs:*:*:*"
286+
},
287+
{
288+
"Effect": "Allow",
289+
"Action": [
290+
"iot:Connect",
291+
"iot:Publish",
292+
"iot:Subscribe",
293+
"iot:Receive",
294+
"iot:DescribeThing",
295+
"iot:GetThingShadow",
296+
"iot:UpdateThingShadow",
297+
"iot:DeleteThingShadow"
298+
],
299+
"Resource": "*"
300+
}
301+
]
302+
}
303+
```
255304
- Attach S3 permissions for component downloads
256305

257306
3. **Create IAM roles**:

setup-build-server.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,16 @@ python3.9 -m pip install --upgrade pip
5555
python3.9 -m pip install --force-reinstall requests==2.32.3
5656
python3.9 -m pip install protobuf
5757

58+
5859
# Install AWS CLI v2 and GDK
5960
python3.9 -m pip install git+https://github.com/aws-greengrass/aws-greengrass-gdk-cli.git
6061
sudo snap install aws-cli --classic
62+
# Add ~/.local/bin to PATH for GDK
63+
if ! grep -q 'export PATH="$HOME/.local/bin:$PATH"' ~/.bashrc; then
64+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
65+
fi
66+
export PATH="$HOME/.local/bin:$PATH"
67+
6168
# Verify AWS CLI installation
6269
aws --version
6370

0 commit comments

Comments
 (0)