@awsless/awsless 0.0.272 → 0.0.274

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -215,10 +215,10 @@ var createLockTable = (client) => {
215
215
  })
216
216
  );
217
217
  };
218
- var createStateBucket = (client) => {
218
+ var createStateBucket = (client, accountId) => {
219
219
  return client.send(
220
220
  new CreateBucketCommand({
221
- Bucket: "awsless-state"
221
+ Bucket: `awsless-state-${accountId}`
222
222
  })
223
223
  );
224
224
  };
@@ -245,7 +245,7 @@ var bootstrapAwsless = async (props) => {
245
245
  await createLockTable(dynamo);
246
246
  }
247
247
  if (!bucket) {
248
- await createStateBucket(s3);
248
+ await createStateBucket(s3, props.accountId);
249
249
  }
250
250
  update("Done deploying the bootstrap stack");
251
251
  });
@@ -712,6 +712,7 @@ var InstancesSchema = z12.record(
712
712
  image: ImageSchema,
713
713
  type: TypeSchema,
714
714
  code: CodeSchema,
715
+ user: z12.string().default("ec2-user"),
715
716
  command: CommandSchema.optional(),
716
717
  environment: EnvironmentSchema2.optional()
717
718
  })
@@ -3484,7 +3485,7 @@ var instanceFeature = defineFeature({
3484
3485
  const userData = new Output2([], (resolve) => {
3485
3486
  ctx.onReady(() => {
3486
3487
  combine([bucketName, ...Object.values(env)]).apply(([bucketName2]) => {
3487
- const u = "ec2-user";
3488
+ const u = props.user;
3488
3489
  const code2 = [
3489
3490
  `#!/bin/bash`,
3490
3491
  `cd /home/${u}`,
@@ -483,6 +483,7 @@ var InstancesSchema = z15.record(
483
483
  image: ImageSchema,
484
484
  type: TypeSchema2,
485
485
  code: CodeSchema,
486
+ user: z15.string().default("ec2-user"),
486
487
  command: CommandSchema.optional(),
487
488
  environment: EnvironmentSchema2.optional()
488
489
  })